Nested Controllers

Sometimes, our controller can become too complex, so we can split the behavior into separated controllers. This can be achieved by creating nested controllers, which means registering controllers that will work only inside a specific element of the view, as shown in the following code.
<body ng-controller="employeeCtrl">
<div ng-controller="employeeNestedCtrl"></div>
</body>

The scope of the nested controllers will inherit all the properties of the outside scope, overriding it in case of equality.
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +