0
渲染我想作爲一個子航線使用,但在吳格不從子路線
路線2的顯示列表的鏈接,當點擊從來都沒有呈現時,呈現的NG-網格。
這裏的plunker:http://plnkr.co/edit/JGmqFj
不知道我做錯了。
var myapp = angular.module('myapp', ["ui.router"])
myapp.config(function($stateProvider, $urlRouterProvider){
// For any unmatched url, send to /route1
$urlRouterProvider.otherwise("/route1")
$stateProvider
.state('route1', {
url: "/route1",
templateUrl: "route1.html"
})
.state('route1.list', {
url: "/list",
templateUrl: "route1.list.html",
controller: function($scope){
$scope.items = ["A", "List", "Of", "Items"];
}
})
.state('route2', {
url: "/route2",
templateUrl: "route2.html"
})
.state('route2.list', {
url: "/list",
templateUrl: "route2.list.html",
controller: function($scope){
$scope.things = [{name:"Lucy", number:23}, {name:"Morgan", number:44}];
$scope.gridOptions = {
data: 'things',
multiSelect: false,
columnDefs: [
{ field: 'name', displayName: 'Name', width: 190 },
{ field: 'number', displayName: 'Number', width: 190 },
]
};
}
})
})