从(移动时它打破Plnkr ):
.state('home', {url: '/home', template: '<pre>{{parentProp}}</pre>',
controller: function ($scope) {$scope.parentProp = ['home'];}})
为了( Plnkr ):
.state('home', {url: '/home', views: {'': {template: '<pre>{{parentProp}}</pre>'}},
controller: function ($scope) {$scope.parentProp = ['home'];}})`
具体来说,我有一个'sidebar'
状态我想添加为副状态,以'home'
。