Skip to content

Application fails to bootstrap with two levels of dynamic params #1045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ggoodman opened this issue Apr 25, 2014 · 1 comment
Closed

Application fails to bootstrap with two levels of dynamic params #1045

ggoodman opened this issue Apr 25, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@ggoodman
Copy link

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)
@nicksloan
Copy link

I'm wondering if this is actually just a more complicated example of #1073. They both present with the same error message, but #1073 is perhaps a more general case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants