You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a diff in the service names and their annotations in the generated angular code:
module.factory("User",['LoopBackResource','LoopBackAuth','$injector',function(Resource,LoopBackAuth,$injector){varR=Resource(urlBase+"/Users/:id",{'id': '@id'},{/// abbreviated for clarity
The service being called in the function parameter is Resource, but it's actual name is LoopBackResource.
The annotation will get replaced by ng-annotate when we run our gulp tasks. thus breaking the module, and causing angular to be unable to find the service, since it's looking for Resource rather than LoopBackResource.
an workaround would be to create a gulp task that replace the word Resource per LoopBackResource. There is a plugin that can do this https://www.npmjs.com/package/gulp-replace.
Activity
bajtos commentedon Oct 9, 2015
@Evanion thank you for reporting the issue. Could you please contribute a fix yourself?
Evanion commentedon Oct 14, 2015
Yea, I will look into it when I have some free time.
luissombra commentedon Dec 16, 2015
an workaround would be to create a gulp task that replace the word Resource per LoopBackResource. There is a plugin that can do this https://www.npmjs.com/package/gulp-replace.
The task could looks like this: