As of Angular 1.2, the use of $scope injectable has been greatly reduced in favor of the "controller as syntax". We are going to take a quick look at cleaning up Eggly to follow this best practice.
Hello Lukas! I want to ask you, is there a good way to use some variable from parent state ctrl in child state ctrl using the controller as syntax? For example using $scope way I have scope inheritance so it works fine, but how it could be done using new controller as syntax? Thanks!
Hello -- I recommend checking out Todd Motto's excellent article on 'controller as' syntax here http://toddmotto.com/digging-into-angulars-controller-as-syntax/. Check out the section on nested scopes as he locks it down perfectly from the template side.
Does this make sense?
Thanks for answering. I think you are right and it make sense. Will wait next videos! Thanks :)
I did the same code, but do not get the updated information in the <H1>..any ideas?
nevermind....dumb caching :)