AngularJS - Which is better, $emit/$on or scope inheritance?
问题 Say I got this following HTML structure: <body ng-app="demo" ng-controller="RootCtrl"> <header> <!-- Header Material --> </header> <main ng-controller="MainCtrl"> <!-- Main Content --> <nav ng-controller="NavCtrl"> <!-- Navbar --> </nav> </main> <body> Now, suppose NavCtrl needs to manipulate a model that happens to exist under RootCtrl 's scope - under which conditions would $emit/$on be better suited? And under which conditions would it be better to directly manipulate the model via scope