$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-5c13e73fa5625327342629/] 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