These are chat archives for jadjoubran/laravel5-angular-material-starter

Aug 2016
Allan Alvarez Ortiz
Aug 19 2016 00:27
Did you run gulp?
Guilherme Saade
Aug 19 2016 00:56
yes, if i try to install a new package, gulp will compile automatically, but ONLY with Boostrap it not compile. WTF?!
Allan Alvarez Ortiz
Aug 19 2016 02:07
What's the error it throws?
Guilherme Saade
Aug 19 2016 03:32
Nothing, just "re-compile" all the others vendors css/js, and ignore bootstrap.
i installed a bunch of others packages, and all of thes are in the vendor.css and final.css
Jad Joubran
Aug 19 2016 09:14
@SaadeMotion this issue should solve it
Mark Kevin Besinga
Aug 19 2016 17:32

Hi.. Can someone check what's wrong with this code below? I am getting Cannot read property 'ToastService' of undefined

heres the code.. I remove some code to make it smaller

class QuestionSetsController{
    constructor(API, $rootScope, DialogService, $timeout, $document, $scope, $log, ToastService){

        this.ToastService = ToastService;

    save(data) {
    this.API.all('questions-set').post('', data).then((response) => {
        if(response.errors) {
            angular.forEach(response.errors, function(error, key) {
Guilherme Saade
Aug 19 2016 19:19
@jadjoubran Thanks Man! It worked!
Aug 19 2016 19:20
@besingamkb you have two options.
Either do var self = this; then do self.ToastService... Inside of the function(error, key) {}
Or use es6 forEach(response.errors, (errors, key) => { }
The scope inside of the function in your code != the scope of object. It doesn't know what 'this' is
Aug 19 2016 19:40
Or rather it doesn't know which scope you're referencing. That's one of the things that was solved in es6