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
classThingFactory{/*@ngInject*/constructor($timeout){this.$timeout=$timeout;}newThing(){console.log('Getting a new Thing...');returnthis.$timeout(()=>newThing(),100);}}register('app').factory('thingFactory',ThingFactory);
In my app, newThing() doesn't have access to ThingFactory object's this. Rather this points to window.
The text was updated successfully, but these errors were encountered:
In my app,
newThing()
doesn't have access toThingFactory
object'sthis
. Ratherthis
points towindow
.The text was updated successfully, but these errors were encountered: