(); // Activate scrollspy, this is where the error happens
$('[data-spy="scroll"]').each(function ()所以我认为这应该是唯一被窥探到的内容,但显然不是:在页面加载时,我得到一个错误,Uncaught TypeError: Cannot read property 'top' of null,这意味着滚动间谍插件试图找到一个不存在的元素的在Chrome的开发工具<em
我遇到的问题是,在angular将模型更改应用到视图之前,我正在从一个angular控制器刷新scrollspy插件。在DOM本身被更新(不仅仅是angular模型)之后,有什么angular的方法来确保scrollspy('refresh')调用发生?scope.httpSuccessCallback = function (data) $('[data-spy="scroll"]').scr