-
-
Save codeMagic23/c01dc780cce5edca2f7c to your computer and use it in GitHub Desktop.
root scope/ctrl different
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| **In app.js** | |
| $rootScope.loading = | |
| { | |
| isLoading:true, | |
| isDone:true, | |
| }; | |
| **in a controller** | |
| console.log('Scope loading: ' + $rootScope.loading.isLoading); | |
| prints | |
| undefined | |
| but | |
| console.log('Scope loading: ' + $rootScope.loading | |
| prints | |
| false | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment