Advertisement

Ionic 中 不合理 层级 的 view 导致 afterEnter 未 被 调 用

阅读量:

在企业所实施的ionic项目中,我们确立了以下状态:

复制代码
 $stateProvider

    
   .state('A', {
    
     abstract: true,
    
     views: {
    
       root: {
    
     template: '<ion-nav-view id="ViewA"></ion-nav-view>'
    
       }
    
     }
    
   })
    
   .state('A.B', {
    
     url: '/A/B',
    
     templateUrl: 'A/B.tpl.html',
    
     controller: 'ABCtrl'
    
   })
    
   .state('A.C', {
    
     abstract: true,
    
     url: '/A/C'
    
   })
    
   .state('A.C.D', {
    
     url: '/D',
    
     views: {
    
       'root@': {
    
     templateUrl: 'A/C/D.tpl.html',
    
     controller: '

全部评论 (0)

还没有任何评论哟~