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
I would expect that the objects returned from findAll are also instances of the user. Here's how I'm using it:
// ... some state definitions$stateProvider.state('root.auth.home.locks.list',{url: '',templateUrl: homeTemplateRoot+'Locks/LocksCtrl.html',controller: 'LocksCtrl',resolve: {locks: resolveDS('findAll',['lock',{}]),users: resolveDS('findAll',['user',{}])}});// ... other state definitionsfunctionresolveDS(method,args){if(!_.isArray(args)){args=[args];}returnfunction(DS){returnDS[method].apply(DS,args);};}// in my LocksCtrlangular.module('pk.web').controller('LocksCtrl',function($scope,locks,users,_){// some $scope initialization stuff using the injected users.});
To be able to get the returned objects as an instance of a User, I would have to do DS.get for everything. If that's the way I'm supposed to be using this and I'm not supposed to actually inject the results of the call to findAll then that's fine. Though I would prefer to simply do it as I am because it seems to make sense to me this way.
The text was updated successfully, but these errors were encountered:
When I do this:
I would expect that the objects returned from findAll are also instances of the user. Here's how I'm using it:
To be able to get the returned objects as an instance of a User, I would have to do DS.get for everything. If that's the way I'm supposed to be using this and I'm not supposed to actually inject the results of the call to
findAll
then that's fine. Though I would prefer to simply do it as I am because it seems to make sense to me this way.The text was updated successfully, but these errors were encountered: