Skip to content

Resolves are re-resolved when redirecting to a child state #2274

@christopherthielen

Description

@christopherthielen

Given:

  • a state tree like so:
A: { resolve: { foo: (fooSvc) => fooSvc.get() } }
A.b: { resolve { bar: (barSvc) => barSvc.get(); } }
  • result of foo resolve will be true
  • a redirect hook, triggered when "A" is entered
    • (implemented either as some other "redirect" resolve, or as an onEnter hook)
    • which will redirect to A.b, when foo is true

when:

  • transitioning to "A"
  • the foo resolve should be fetched and resolved to true
  • the redirect should redirect to "A.b"

then:

  • the foo resolve should not be fetched again. Its pre-redirect value of true should be used.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions