首页 新闻 会员 周边

angular 路由与history的关系,求解

0
悬赏园豆:5 [待解决问题]

场景: 使用 routerProvider做了一个TAB

问题: 切换TAB 没问题,但是当我回退时,我希望是回到上个页面,而不是在TAB间往返回退。原因应该是切换时路由地址写入历史记录了,但是怎样才能做到直接回退到上个页面?

        app.config(['$stateProvider','$urlRouterProvider',function($stateProvider, $urlRouterProvider) {
          $urlRouterProvider.otherwise("/chose");          
          $stateProvider
            .state('chose', {
              url: "/chose",
              views:{
                  'choseview':{
                      templateUrl:'html/lease/choose-module/choseGood.html',
                      controller:'choseCtrl'
                  },
                  'tagview':{
                      templateUrl:'html/lease/choose-module/choseGood.html',
                      controller:'choseCtrl'
                  }
              }
            })
            .state('detail', {
              url: "/detail",
              views:{
                  'choseview':{
                      templateUrl:'html/lease/choose-module/choseGood.html',
                      controller:'choseCtrl'
                  },
                  'tagview':{
                      templateUrl:'html/lease/choose-module/detail.html',
                      controller:'detailCtrl'
                  }
              }
            })
忧郁的白衬衫的主页 忧郁的白衬衫 | 菜鸟二级 | 园豆:207
提问于:2016-05-17 10:37
< >
分享
所有回答(1)
0

ui.router 好像没有这方面解决方案,退而求其次2个TAB 内容一起加载吧 选择性呈现

忧郁的白衬衫 | 园豆:207 (菜鸟二级) | 2016-05-17 17:23
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册