0

I created a service which asynchronously takes some data and saves it as

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

inside the service. When i console.log service.someitem, it logs as supposed, but when I try to assign it to $scope = service.someitem it does not bind it with the template?


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

1 Answer 1

1

You are overwriting your whole $scope with $scope = service.someitem it should be rather $scope.modelToUse = service.someitem

Sign up to request clarification or add additional context in comments.

1 Comment

found it in the same time!:) though its my own answer i'll accept:-)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.