A. Duff
A. Duff

Reputation: 4309

Persist data between pages in Angular2

Sometimes you want to call router.navigate to a new location, but send data to that page without placing it in the URL, for example, a complex object that has been manipulated in the first page.

How is that accomplished in Angular2?

Upvotes: 1

Views: 1059

Answers (1)

Roman C
Roman C

Reputation: 1

In Angular2 it's accomplished through dependency injection. You are using shared service between components and retrieve data in ngOnInit().

Upvotes: 1

Related Questions