-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
When both a parent and child state define optional, dynamic parameters, the application fails to bootstrap.
$stateProvider.state("parent", {
url: "/?parentParam",
templateUrl: "parent.html",
params: {
parentParam: {
value: null,
dynamic: true
}
},
controller: function () {
}
});
$stateProvider.state("parent.child", {
url: "/child?childParam",
templateUrl: "child.html",
params: {
childParam: {
value: null,
dynamic: true
}
},
controller: function () {
}
});
Results in the following error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module plunker due to:
Error: Missing required parameter 'parentParam' in state 'parent.child'
at http://run.plnkr.co/uyP1Fmf4JJCrTanq/ui-router.js:1845:17
at forEach (https://ajax....<omitted>...1)