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

30th
Jun 2016
Jad Joubran
@jadjoubran
Jun 30 2016 12:13
@flick36 ah yes indeed I've had a look.. so yeah it's much lighter than angular, so technically you've also got components but they're much lighter (also means less features are available)
this could be great if you don't want your app to be a full single page app
so mainly for people that want to keep Laravel responsible for routing
but when you decide to take your app Full SPA (and assuming this makes sense for your business) then Angular makes more sense
can you name some nice stuff from Spark that can be added here? :D
Mark Kevin Besinga
@besingamkb
Jun 30 2016 13:02
hi I am using ng-file-upload module. the upload function work but I can't run a or call an class variable inside the ng-file-upload block.
uploadFiles(file, errFiles) {
    this.f = file;
    this.errFiles = errFiles && errFiles[0];

    if (file) {
        file.upload = this.Upload.upload({
            url: 'api/upload',
            data: {file: file}
        });

        file.upload.then(function (response) {
            file.result = response.data;
            this.loadProfile();  // <------- this is a function in the same class and I cant run this. 
        }, function (response) {
            if (response.status > 0)
                this.errorMsg = response.status + ': ' + response.data;
        }, function (evt) {
            file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
        }
        );
    }
}
Allan Alvarez Ortiz
@flick36
Jun 30 2016 17:29
@jadjoubran probably the User Impersonation, API Out Of The Box, Announcements, Subscriptions, Invoices, Team Billing now i know probably not everyone may uses all of this, but like in Spark, they're there and they're optional to activate, maybe something similar with the starter? cause most of the user i believe are looking for an Admin Panel? probably 60% out 100% don't know maybe a poll will ask that question, but it would be nice. Or, implemented as plugins/recepies but that's more work for the user, i want to think about those implementations as modules, that can or can't be activated as sparks does

@besingamkb you are using ES5 functions, so 'this' belongs to that function, see Lexical this just changue:

file.upload.then(function (response) {
            file.result = response.data;
            this.loadProfile();  // <------- this is a function in the same class and I cant run this. 
        }, function (response) {
            if (response.status > 0)
                this.errorMsg = response.status + ': ' + response.data;
        }, function (evt) {
            file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
        }
        );

to:

file.upload.then( (response) => {
            file.result = response.data;
            this.loadProfile();  // <------- this is a function in the same class and I cant run this. 
        }, (response) => {
            if (response.status > 0)
                this.errorMsg = response.status + ': ' + response.data;
        }, (evt) => {
            file.progress = Math.min(100, parseInt(100.0 * evt.loaded / evt.total));
        }
        );
Allan Alvarez Ortiz
@flick36
Jun 30 2016 17:35
This message was deleted
Jad Joubran
@jadjoubran
Jun 30 2016 17:51
@flick36 yeah true.. the reason why Spark is able to do that is because it's an SAAS tool.. so he can expect what people need out of the box
Jad Joubran
@jadjoubran
Jun 30 2016 18:03
@flick36 However I really like your idea.. and exactly what you said regarding recipes.. that's where Plugins come to play.. A plugin can be installed just like you install any package, and then you can "publish vendor" and that's it you have everything.. up and running
it is a great idea, so maybe after releasing 3.3.0, and if Angular 2 doesn't go live :p I can work on it but if Angular 2 goes live, it becomes a priority