Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs ui路由器对继承对象参数的更改未持久化为同级状态_Angularjs_Angular Ui Router - Fatal编程技术网

Angularjs ui路由器对继承对象参数的更改未持久化为同级状态

Angularjs ui路由器对继承对象参数的更改未持久化为同级状态,angularjs,angular-ui-router,Angularjs,Angular Ui Router,我正试图建立一些州,如下所示 state('search', { url: '', templateUrl: '/modules/core/views/search.html', controller: 'SearchController' }). state('check', { controller: 'CheckController', abstract: true, template: '<ui-view></ui-view>', pa

我正试图建立一些州,如下所示

state('search', {
  url: '',
  templateUrl: '/modules/core/views/search.html',
  controller: 'SearchController'
}).
state('check', {
  controller: 'CheckController',
  abstract: true,
  template: '<ui-view></ui-view>',
  params: {
    subject: null
  }
}).
state('check.status', {
  templateUrl: '/modules/core/views/check-status.client.view.html'
}).
state('check.personal', {
  templateUrl: '/modules/core/views/check-personal.client.view.html'
});

从抽象父级中删除param,将其添加到旅程中的第一个状态,并使用一个小控制器在父级作用域上分配属性

我认为在您的子状态配置中,您可以告诉ui路由器防止重新加载:

state('check.status', {
  templateUrl: '/modules/core/views/check-status.client.view.html',
  reloadOnSearch: false
})

对持久数据使用resolve block…@PoyrazYilmaz你能详细说明一下吗?这不起作用-我认为只适用于URL参数。
state('check.status', {
  templateUrl: '/modules/core/views/check-status.client.view.html',
  reloadOnSearch: false
})