I appreciate your way of teaching. This is amazing and I am starting to understand these concepts that I once thought would be impossible to wrap my head around. Thank you for that!
dude thank you ive been trying to learn angular for months and your class is bye far the best class great explanations and examples seriously thank you, ive sat through hours and hours of angular courses that i could never understand
A simpler way to compute totalProductOutOfStock = totalProductCount - totalProductInStock but the method used is of value because it teaches people how to use the filter() method.
The filter component doesn't have access to the data in the product-list component unless we pass that date in explicitly. This is called encapsulation and is an important security benefit. I recommend reading up on encapsulation for more information.
Like the first reply mentioned, it's important to modularize your code. keeping the filter component separate allows us to encapsulate an object's properties. Apart from security purposes, a fundamental objective of Object-Oriented programming is to reuse objects where we can. If we built that filter component within the product-list, we might not be able to use it in other components. This helps make the code reusable as well :) I recommend going through an OOP course online to supplement your Angular learnings, as you will slowly understand the pros and cons of different languages and frameworks on your own.
I appreciate your way of teaching. This is amazing and I am starting to understand these concepts that I once thought would be impossible to wrap my head around. Thank you for that!
dude thank you ive been trying to learn angular for months and your class is bye far the best class great explanations and examples seriously thank you, ive sat through hours and hours of angular courses that i could never understand
He has a natural talent for teaching!
A simpler way to compute totalProductOutOfStock = totalProductCount - totalProductInStock but the method used is of value because it teaches people how to use the filter() method.
Nicely explained
Thank you sir for this series
Awesome explanation.....
plz, if you can call an api for the product item
Quick question why do we necessarily need to use @input and @output instead of doing all the logic in that very component
The filter component doesn't have access to the data in the product-list component unless we pass that date in explicitly. This is called encapsulation and is an important security benefit. I recommend reading up on encapsulation for more information.
Like the first reply mentioned, it's important to modularize your code. keeping the filter component separate allows us to encapsulate an object's properties. Apart from security purposes, a fundamental objective of Object-Oriented programming is to reuse objects where we can. If we built that filter component within the product-list, we might not be able to use it in other components. This helps make the code reusable as well :)
I recommend going through an OOP course online to supplement your Angular learnings, as you will slowly understand the pros and cons of different languages and frameworks on your own.