which is best to use $rootScope.$emit or $$rootScope.$broadcast for angularjs loader indicator in angularjs -


$rootscope.$emit flows $rootscope , $rootscope.$broadcast flows down scope $rootscope , $scope's in angularjs. still confused of use angularjs loader indicator .

$rootscope.$emit lets other $rootscope listeners catch it. when don't want every $scope it.

$rootscope.$broadcast method lets pretty hear it.

this might help, can refer original answer here


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -