1
私は簡単なデモを書いて、UIルータを理解しようとしました。ui-routerを使用している間にdivの複製が得られるのはなぜですか?
しかし、問題は、私はuiルータを使用中に重複したビューを持っている。ここで
がstateProvider一部
app.config(function($stateProvider,$urlRouterProvider){
$urlRouterProvider.otherwise('/baseView');
$stateProvider
.state('baseView',{
url:"/baseView",
templateUrl:"baseView.html"
})
.state('baseView.empty',{
abstract: true,
views:{
"navBar":{
templateUrl:"sideBar.html",
controller: "sideCtrl"
},
"123":{
templateUrl:"content.html"
}
}
})
.state('baseView.empty.content1',{
url:'/content1',
templateUrl:"content1.html"
})
.state('baseView.empty.content2',{
url:'/content2',
templateUrl:"content2.html"
})
})
plunkerです:http://plnkr.co/edit/Rm0Q50GX2GYvqyKnzkKz?p=preview
あなたはできるだけ早くあなたがplunkerでプレビューを見ると、問題が表示されます。
私は
ありがとう!私はもっと注意する必要があります! –
あなたは喜んで答えを受け入れることができます。ありがとう;) –