angularjs - $rootScope 在 onExit
问题描述
我想在状态改变时使用$rootScope.$broadcast()
inside 。onExit
但为此,我需要注入,这在 Angular$rootScope
中.config()
是不可能的
onExit: function () {
//onExit is executed when we leave that state and go to another
$rootScope.$broadcast('broadCastCloseModalStr');
}
有人可以帮我实现它吗?
解决方案
推荐阅读
- xaml - 如何将这些框架垂直并排放置?
- vbscript - 如何在此现有代码中每次使用 vbs 按下随机字符串
- python - 在 Python 中将集合转换为列表
- crystal-reports - 如何在水晶报表中将行转列
- c# - 预测引擎 - 模式不匹配:“R4 的预期标量或已知大小向量,得到可变大小向量”
- python - 如何遍历系列中的列表
- javascript - React Navigation:将整个导航状态重置为初始值
- php - 如何从另一个表主键添加mysql外键?
- excel - Powershell选择已打开的excel工作表的整行
- r - as.data.frame 与以前使用的代码和对象的突然错误