【发布时间】:2015-11-16 06:43:03
【问题描述】:
这是我的Plunker。
.state('tabs', {
url: "/tab",
abstract: true,
cache: false,
templateUrl: "tabs.html"
// controller: 'AppCtrl'
})
.state('tabs.home', {
url: "/home",
cache: false,
views: {
'home-tab': {
templateUrl: "home.html"
// controller: 'welcomeController'
}
}
})
.state('tabs.list', {
url: "/list",
cache: false,
views: {
'category-tab': {
templateUrl: "list.html"
//
}
}
})
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/tab/home');
现在,当我在视图之间切换时,视图会相互加载,您可以同时看到它们。或者更好的说法是:网址改变但视图不变。
我错过了什么吗?谢谢
【问题讨论】:
标签: angularjs ionic-framework ionic angular-routing angular-ui-router