Add missing "parent" property to angular-ui-router state configuration object

As documented here: http://angular-ui.github.io/ui-router/site/#/api/ui.router.state.$stateProvider
This commit is contained in:
Sam Herrmann
2015-06-03 22:06:25 -04:00
parent c50b111ded
commit 5a7baf8191
2 changed files with 17 additions and 1 deletions

View File

@@ -64,7 +64,16 @@ myApp.config((
controller: function ($scope: MyAppScope) {
$scope.things = ["A", "Set", "Of", "Things"];
}
}).state('index', {
})
.state('list', {
parent: 'state3',
url: "/list",
templateUrl: "partials/state3.list.html",
controller: function ($scope: MyAppScope) {
$scope.things = ["A", "Set", "Of", "Things"];
}
})
.state('index', {
url: "",
views: {
"viewA": { template: "index.viewA" },

View File

@@ -30,6 +30,13 @@ declare module angular.ui {
* Function (injectable), returns the actual controller function or string.
*/
controllerProvider?: Function;
/**
* Specifies the parent state of this state
*/
parent?: string | IState
resolve?: {};
/**
* A url with optional parameters. When a state is navigated or transitioned to, the $stateParams service will be populated with any parameters that were passed.