onExit 中的 $rootScope
$rootScope in onExit
我想在状态更改时在 onExit
中使用 $rootScope.$broadcast()
。
但是为此,我需要在.config()
中注入$rootScope
,这在angular
中是不可能的
onExit: function () {
//onExit is executed when we leave that state and go to another
$rootScope.$broadcast('broadCastCloseModalStr');
}
有人可以帮我实现吗?
我想在状态更改时在 onExit
中使用 $rootScope.$broadcast()
。
但是为此,我需要在.config()
中注入$rootScope
,这在angular
onExit: function () {
//onExit is executed when we leave that state and go to another
$rootScope.$broadcast('broadCastCloseModalStr');
}
有人可以帮我实现吗?