Skip to content

Parent resolve overwritten when changing state param #883

@KrisBraun

Description

@KrisBraun

I have nested states, each with resolve properties, something like this:

  .state 'parent',
    url: '/:parentId'
    resolve:
      resolve1: -> ...
  .state 'parent.child'
    url: '/:childId'
    resolve:
      resolve2: -> ...
    views:
      template: '<p>test</p>'
      controller: (resolve1, resolve2) ->

When first loading a child page, I see the proper objects injected in the controller. When navigating to a page that changes the :childId but leaves the :parentId the same, both resolve1 and resolve2 are set to the same object, the new resolve2 object. I've verified the parent resolve is not being called a second time. So it seems the the wrong object is getting injected in the second case.

I need more time to make a Plunkr reproducing the issue but thought I'd put this out there in case someone already knows what is going on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions