Suggested Videos
Part 41 - Angular read route parameters | Text | Slides
Part 42 - Subscribe to angular route parameter changes | Text | Slides
Part 43 - Angular optional route parameters | Text | Slides
In this video we will discuss some of the common differences between required route parameters and optional route parameters in Angular. This is continuation to Part 43. Please watch Part 43 from Angular CURD tutorial.
Part 41 - Angular read route parameters | Text | Slides
Part 42 - Subscribe to angular route parameter changes | Text | Slides
Part 43 - Angular optional route parameters | Text | Slides
In this video we will discuss some of the common differences between required route parameters and optional route parameters in Angular. This is continuation to Part 43. Please watch Part 43 from Angular CURD tutorial.
- Required route parameters are part of route configuration where as optional route parameters are not.
- Required route parameters are used in pattern matching i.e when mapping an incoming URL to a named route in our application. Optional route parameters are not used in pattern matching.
- Optional route parameters must be passed after the required route parameters if any.
- In general, prefer a required route parameter when the value is simple and mandatory. For example, to view a specific employee details, the ID parameter is mandatory and it is a simple integer. On the other hand, prefer an optional route parameter when the value is optional and complex. For example you want to send many search parameters like NAME, AGE, DEPARTMENT, DOB etc...from the SEARCH PAGE to LIST PAGE.
No comments:
Post a Comment
It would be great if you can help share these free resources