我需要在分配视图内容之前插入 css/js。
$stateChangeStart
, $stateChangeSuccess
,$viewContentLoaded
没有弄清楚我的问题。我想写这样的代码:
$rootScope.$on('$beforeInsertHtml', function(event, state) {
if (state.files) {
updateFiles(state.files); // my loader
}
});
有什么解决办法吗?看起来我需要更改源代码并添加其他事件。