$emit, $broadcast, $on – Part1

How to use $rootScope: As we know that $rootScope is the parent for $scope, to override the $rootScope we need to re-initialize the $rootScope variable with $scope Let us see an example [crayon-5c6989705dbdc478215390/] In this example we have injected $rootScope in both parent and child controllers. As $rootScope variables will be available throughout the application … Continue reading $emit, $broadcast, $on – Part1