Angularjs $location.search未立即更新
我有一个问题,我的url没有得到更新,每次我设置它。它在某种程度上与指令有关,因为在其他情况下它是有效的Angularjs $location.search未立即更新,angularjs,angularjs-directive,angular-routing,Angularjs,Angularjs Directive,Angular Routing,我有一个问题,我的url没有得到更新,每次我设置它。它在某种程度上与指令有关,因为在其他情况下它是有效的 所以我的问题是,$location.search('dd',val)依赖于什么,它在等待什么,因为函数被调用,但url没有更新。它在等待摘要 $scope.$apply(function() { $location.search('dd', val) }) 它等待一个摘要 $scope.$apply(function() { $location.search('dd', val
所以我的问题是,
$location.search('dd',val)
依赖于什么,它在等待什么,因为函数被调用,但url没有更新。它在等待摘要
$scope.$apply(function() {
$location.search('dd', val)
})
它等待一个摘要
$scope.$apply(function() {
$location.search('dd', val)
})
它等待一个摘要
$scope.$apply(function() {
$location.search('dd', val)
})
它等待一个摘要
$scope.$apply(function() {
$location.search('dd', val)
})
摘要周期需要时间来更新DOM。 我遇到了类似的问题,在更新url后我不得不重新加载页面 我在完成摘要循环后需要运行的代码中使用了$timeout
$location.search('filter', null);
$timeout(function() {
//the code which needs to run after dom rendering
$window.location.reload();
}.bind(this))
摘要周期需要时间来更新DOM。 我遇到了类似的问题,在更新url后我不得不重新加载页面 我在完成摘要循环后需要运行的代码中使用了$timeout
$location.search('filter', null);
$timeout(function() {
//the code which needs to run after dom rendering
$window.location.reload();
}.bind(this))
摘要周期需要时间来更新DOM。 我遇到了类似的问题,在更新url后我不得不重新加载页面 我在完成摘要循环后需要运行的代码中使用了$timeout
$location.search('filter', null);
$timeout(function() {
//the code which needs to run after dom rendering
$window.location.reload();
}.bind(this))
摘要周期需要时间来更新DOM。 我遇到了类似的问题,在更新url后我不得不重新加载页面 我在完成摘要循环后需要运行的代码中使用了$timeout
$location.search('filter', null);
$timeout(function() {
//the code which needs to run after dom rendering
$window.location.reload();
}.bind(this))
有没有办法,去检测,是什么让摘要周期如此之长?angular batarang有一个性能标签-有没有办法,去检测,是什么让摘要周期如此之长?angular batarang有一个性能标签-有没有办法,去检测,是什么让摘要周期如此之长?angular batarang有一个性能选项卡-有没有办法检测是什么让摘要周期如此之长?angular batarang有一个性能选项卡-