Saturday, 15 January 2011

angularjs - Data from service to $scope -



angularjs - Data from service to $scope -

i created service asynchronously takes info , saves as

someitem = { something: 'a', somethingelse: 'b'}

inside service. when console.log service.someitem, logs supposed, when seek assign $scope = service.someitem not bind template?

edit. found mistake: i'm overriting $scope object...

you overwriting whole $scope $scope = service.someitem should rather $scope.modeltouse = service.someitem

angularjs angularjs-scope

No comments:

Post a Comment