2017-03-15 44 views
0

粘滯狀態在具有參數時似乎不起作用。當應用於帶參數的狀態時,粘滯狀態不起作用

例子:

$stateProvider 
     .state('store', { 
      url: '/store', 
      abstract: true, 
      onEnter: function() { 
       //debugger 
      }, 
      templateUrl: helper.basepath('store.html'), 

     }); 
.state('store.products1', { 
     url: '/store/:product_id', 
     sticky: true 
}).state('store.products2', { 
     url: '/store/:product_id', 
     sticky: true 
}) 

我控制器再次初始化並again.I不希望出現這種情況。

回答

0

問題是我使用的是最新版本的ui路由器,即0.3.1,但粘性狀態與ui路由器版本0.2.14一起使用,而不是0.2.15以上版本等等。