Injecting services/controllers and scope to components and handeling events #122
Description
I would like to suggest adding a chapter about injecting a service and a scope to components. These are important features needed by anything that is more than just an hello world example.
It's not clear to me when to inject a controller, a service and a scope.
A should be injected only to the controller and a component that wants to send data to the server should call the controller that calls the service or should the component use the service directly?
When do I want to use data-binding and when to inject the scope? Injecting the scope is only needed when we need to listen to or send events (emit/broadcast)?
Injecting a controller might be demonstrated for saving recipe rating to the server?
A dummy saveRating method on the controller could maybe use localStorage for the tutorial.
Thanks