If AngularJS Controllers are the glue of an application, how do they communicate and pass data around? This introduction to service factories will shed some light on that question.
These two controllers are in a parent-child relationship. How about sharing data between two side-by-side controllers?
To share the greeting service between the controllers, we used the variable name "greeting" in the controller's first argument. Does this not break after js minification? How can we work around this?
It does break the after minification. This is how you work around it: .controller('FirstCtrl', ['greeting', function(foo) { // foo is the greeting service in here }])
Check out this lesson on using a build tool to make all your angular code "min safe".
https://egghead.io/lessons/angularjs-using-ng-annotate-for-min-safe-angularjs
What editor are you using?
webstorm
Hello there, i'm a bit new to Angular. So thank you for these courses :)
So here's a noob question. I'm trying to follow the lectures by also reading the Rout code module to have a deeper understanding:
https://code.angularjs.org/1.4.7/angular-route.js
Inside that code- I can't find: (1) ui-view or (2) ui- sref.
So Where are we getting those two functions from ?
Thanks !
I think what you should refer to is angular-ui-router rather than angular-router.
Where can I find the code for this? The code below the video is not the one thats shown in the video
Where can I find the code for this? The code below the video is not the one thats shown in the video
What you see is what you get!
Is that deliberate? to post different version of code below the video?