#33 ng-template in Angular | Angular Component & Directives | A Complete Angular Course
ฝัง
- เผยแพร่เมื่อ 1 ธ.ค. 2024
- In this lecture you will learn about ng-template which is an Angular element. You will learn what in ng-template, what is its use and how to use it to render an HTML template in DOM
ASP.NET Core GitHub Repo: github.com/man...
NODE JS Course GitHub Repo: github.com/man...
ANGULAR 16 Course GitHub Repo: github.com/man...
believe or not but I just finished your video about ng-content and wanted to check if you added video on this topic. I was surprised seeing it added only 44 minutes ago :D
Great quality videos.. thank you sir 🔥🔥🔥
amazing content and easy to understand thank you so much , keep up the good work !!!!
Thank you so much sir..I learn lof of things about Angular
Salute bro🎉..to your strong effort..
Please complete the full course 🙏🙏❤️
Simply we can use NgIf in notify me as well? Why we need to use ng-template, may I know the purpose?
fr. It just complicates it even more in my opinion
Thank you by tutorial
How do I use an ng-template defined in one component in another component? For example I have several svg-icons that I use in several different component templates. For now the same svg is copied in all those places. I could define a component for each svg but that is ridiculous. I would like to have a single component whose html template contains a 'library' of ng-templates html snippets that I could then use through my project. However, I dont know how to access those snippets unless I am in the same html file as the snippets (like you do in this tutorial).
PS: Your lectures are the best. Well presented with excellent diction!
template referance variable isnt declared inside *ngtemplateoutlet so shouldn't it throw an error?
how does it still work?
sir cant we show notify button using *ngif = "!Product_isin_inventory"
Is there git for this ekart project?
HI,
I am not sure still why is ng-template necessary if the same result can be achieved by just ngIf. Can you please the video or comment showing difference?
In this example, it was just a label change, so you could handle with another ngIf. But what if there are many more controls that you want to show or hide based on a condition? In that case, we can't write so many ngIf's and ng-template will come handy.
@@VamsiKrishna-rd2ok I'd put all that stuff in the new component and use *ngIf
There is an important point that you forgot to add here, which is adding a variable inside the template.
thanks
😀
thanks