Rangle.io : Angular 2 Training

Updated a year ago

Aviad Pineles (@aviadpineles) started discussion #224

10 months ago · 0 comments


In the above example, say that the child routes of product-details needed the ID of the product to fetch the spec or overview information. The child route component can access the parent route's parameters as follows:

Defining Child Routes (Edit this file)

Wrong way to access parent route (as of 4.3.1)

The correct way to access parent route parameters as of 4.3.1 is using ActivatedRoute.parent. I.e. in this example this.route.parent.paramMap.subscribe...

No comments on this discussion.

to join this conversation on GitBook. Already have an account? Sign in to comment

You’re not receiving notifications from this thread.

1 participant