2017-03-15 85 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以上版本等等。