Depzor
Depzor

Reputation: 1316

Angular2: How to pass object into a state using ui-router

I'd like to be able to pass an object to a state using ui router. How can I do this?

I am using this to submit my object to a next state:

this.uiRouter.stateService.go('example', { object: { title: 'my object' }}, null);

Upvotes: 1

Views: 284

Answers (1)

Andy-Delosdos
Andy-Delosdos

Reputation: 3720

I would probably use a service for this. e.g. save state to service on first step, then navigate, then fetch state from service and continue.

Upvotes: 2

Related Questions