ngroute - Angular router's viewContentLoading issue did not work -
i have created set of views using ui-router.then write run() function listen route issue this:
$rootscope.$on('$viewcontentloading',function(evt,config){ console.log("one loading!"); })
so want create movement or kind of animate during view content loading,but code above consoled nothing. try state called $viewcontentloaded , same thing,and worked,it consoled expected.
but why these 2 issues behave differently?
are positive you're setting listeners on correct scopes? $viewcontentloading
broadcast on $rootscope
while $viewcontentloaded
emitted local $scope
.
this stackoverflow question may shed light on why 2 act different , may figure out what's wrong:
maybe can add plunkr showing issue? unable replicate issue.
Comments
Post a Comment