Route Parameters - Angular (Tutorial #21)
Route Parameters in Angular - Tutorial no. 21. Sometimes we need part of the path in one or more of our routes (the URLs) to be a variable, a common example of this is an ID. Share this video: • Route Parameters - Angular (Tutorial #21) Watch complete FREE course here: • Introduction- Angular (Tutorial #1) Lets say we have a User and each User has an ID, the URLs for each User might look like: /user/1 /user/2 /user/3 and so on... But a better solution is to have one route with one component called UserComponent and pass to the UserComponent the number part of the URL. That’s called a parameterised route and we would implement it like so: const routes: Routes = [ { path: 'user/:id', component: UserComponent } ]; The path has a variable called id, we know it’s a variable since it begins with a colon : A path can have any number of variables as long as they all start with : and have different names. ActivatedRoute: Now we will read the parameter value in userComponent using ACtivatedRoute Class . ActivatedRoute class give us a snapshot object which will return the route parameters as object If you liked my channel , subscribe to it and like my videos. For any queries ask you question in comment section you can also connect with me @ Facebook: / angularjs4beginners LinkedIn: / nisha-singla-82407aa0 Website : I hope you liked this Angular tutorial. If you are a beginner and facing any trouble in understanding the Route Parameters in Angular 5, feel free to drop the comment below and I'll be happy to help you at my best.

Nested Routes - Angular (Tutorial #22)

Routing - Angular (Tutorial #20)

HTTP Error Handling - Angular (Tutorial #19)

Angular Life Cycle Hook #Part2 | ngOnChanges vs ngDoCheck | (Tutorial 42)

Building Forms in Angular Apps | Mosh

Promises vs Observables - Angular (Tutorial #30)

CanDeactivate Route Guard - Angular (Tutorial #26)

Lazy Loading - Angular (Tutorial #29)

Python Object Oriented Programming (OOP) - For Beginners

Angular state management with NGRX | NGRX tutorial for beginner | Angular project with NGRX state |

Data Binding - Angular (Tutorial #6)

The difference between provider, factory and service in AngularJS

Async Subject| Real-life Example in Angular - Angular (Tutorial 34)

Object Oriented Programming | OOPS in Python | OOPS Tutorial | Intellipaat

Subject and BehaviorSubject | Components Communication using Subject - Angular (Tutorial 33)

@ViewChild/@ViewChildren in Angular (Tutorial 35)

Learn C# in Unity - Complete Course for Beginners

NgSwitch Directive - Angular(Tutorial #11)

Angular Components Beginner's Guide

