模态父页面刷新状态更改

时间:2015-10-01 22:49:35

标签: angularjs angular-ui-router

我有一个默认状态和两个模态状态。当模态打开并进入另一个模态时,父视图会刷新。有没有办法防止这种情况发生?

.state 'main',
  url: '/main',
  templateUrl: '/views/main.html',
  controller: 'MainCtrl'
.state 'main.company',
  url: '/company',
  onEnter: ($modal) ->
    $modal.open
      templateUrl: '/views/company.html',
      controller: 'CompanyCtrl',
      animation: true,
      size: 'sm'
    return
 .state 'main.form',
   url: '/form',
   onEnter: ($modal) ->
   $modal.open
     templateUrl: '/views/form.html',
     controller: 'FormCtrl',
     animation: true,
     size: 'sm'
   return

0 个答案:

没有答案