InterviewSolution
| 1. |
What is parent scope and rootScope in AngularJS? |
|
Answer» The parent scope in ANGULAR REFERS to the scope of the parent element of any page. Now, in the above case, you can ACCESS the variables attached to the parentController using the childController through the parent scope. In ANgular, all the applications have a $rootScope which is basically the scope created on an HTML element containing the ng-app directive. ExampleFor example, here you have an element which is NESTED WITHIN another element using its own controller: |
|