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

16th
Jun 2016
Feyyaz Esatoğlu
@feyyazesat
Jun 16 2016 05:17
Hi folks
how could I use 'this' inside $interval.
I tried followings but I get cannot read property receive of undefined
    this.$interval(function() { this.receive() }, 2000);
    this.$interval(this.receive.toString(), 2000);
non of them working,
receive() { } is a method in my class.
I injected $interval with no problem.
Feyyaz Esatoğlu
@feyyazesat
Jun 16 2016 06:00
nevermind, gulp watch was broken, the changes wasn't representing.
I fixed the issue
by using
    this.$timeout(() => { this.$interval(() => { this.receive(); }, 2000); }, 2000);
Feyyaz Esatoğlu
@feyyazesat
Jun 16 2016 07:49
I want to use respondcms.com as a cms solution, it also uses angular and jwt auth. But CMS users are in a different table. I would like to put a route prefix /api/cms for the cms action. Now this brings multiple authentication system.
I see dingo API defined a middleware for authentication as 'api.auth' => 'Dingo\Api\Http\Middleware\Auth',
I will create an api.cms.auth middleware, but the steps are fuzzy.
is my approach correct ? Did I missing something, the most fuzzy section is about the JWTAuth. and it is so important to not mix frontend and cms tokens in any steps.
Could you please give me some ideas about that ?
Mark Kevin Besinga
@besingamkb
Jun 16 2016 13:11
hi @jadjoubran thanks. where do I can put that code? i really don't have idea.
Jad Joubran
@jadjoubran
Jun 16 2016 13:36
@besingamkb you could generate a config for it using artisan ng:config
@feyyazesat yes it is a good idea to create a separate api.cms.auth
it should be fine I guess, I never worked with it though
Feel free to open an issue if you need help!
Feyyaz Esatoğlu
@feyyazesat
Jun 16 2016 13:39
@jadjoubran appreciated for your help and sure If I succeeded I will open a pull request.
not cms specific but I may create a factory for it.
Jad Joubran
@jadjoubran
Jun 16 2016 14:43
Thanks @feyyazesat, sounds like a Recipe though => https://github.com/jadjoubran/laravel-angular-recipes
Feyyaz Esatoğlu
@feyyazesat
Jun 16 2016 14:44
@jadjoubran yep I'll go for it!
Mark Kevin Besinga
@besingamkb
Jun 16 2016 15:18
hi i am facing an error that only occur on google chrome Failed to execute 'setRequestHeader' on 'XMLHttpRequest' it is weird cause on heroku which is has the same branch I am using it is working on google chrome
Jad Joubran
@jadjoubran
Jun 16 2016 16:38
@besingamkb jadjoubran/laravel5-angular-material-starter#298