Hacker News new | ask | show | jobs
by aidos 4695 days ago
This seems pretty obvious but it highlights an issue for people approaching a framework like angular. There are bits of magic that happen and you're never quite sure where they end. In this case it's just basic js assignment behaviour.

On a slightly deeper level it raises the issue of how much the view should know about the services. The final result here is a lot less code at the expense of the views directly interacting with the services.

2 comments

I really appreciate your answer. As I said in the first post, I am a learner too, so I will update it with your insights :)
Assigning the Service to $scope made me cringe a bit.