In this video tutorial we will have a look at an advanced angular design pattern - forRoot() / forChild(). We will see what kind of problems it used to solve many years ago and how we can use it today in order to configure Angular modules. Besides this we will have a look at source code of Angular and check how Angular team used this pattern for RouterModule. I hope you will find something interesting from this video and I am looking forward for your feedback. Enjoy watching!

⚠️ New to Angular? This course will be the best starting point for you:
http://bit.ly/angular-for-beginners

⚠️ If you are working with GraphQL then check out my video course about Hasura GraphQL engine with the lowest possible price:
✅ 20%-off with HASURA-EASY-START code: https://bit.ly/complete-hasura-course
✅ SkillShare with 14 Days Free Trial: https://skl.sh/3fahki2

Time Codes:
00:00:00 - Intro;
00:01:18 - Demo project overview;
00:03:55 - Implement a feature which describes the problem;
00:11:14 - Demonstration of multi-service bug for lazy modules;
00:13:17 - Solving the issue using forRoot() pattern;
00:18:02 - Using forChild() pattern to configure lazy modules;
00:28:31 - forRoot()/forChild() pattern in Angular source code;
00:31:28 - Outro.

🔗 Everything about Angular Dependency Injection in this playlist:
https://youtube.com/playlist?list=PLX7eV3JL9sfmJ6AaZj9eDlAKrJrEul4Vz

🔗 Link to the source code on GitHub:
https://github.com/DMezhenskyi/angular-forroot-forchild

#webdevelopment #frontend #angularpatterns #angular

Advanced #Angular Patterns - ForRoot & ForChild (2021, Decoded)
1.35 GEEK