#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...

ความคิดเห็น • 20

  • @wiktorwachowski6291
    @wiktorwachowski6291 ปีที่แล้ว +6

    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

  • @sona4612
    @sona4612 ปีที่แล้ว +2

    Great quality videos.. thank you sir 🔥🔥🔥

  • @80_kunaltilekar30
    @80_kunaltilekar30 10 หลายเดือนก่อน +1

    amazing content and easy to understand thank you so much , keep up the good work !!!!

  • @Thinkeasy86
    @Thinkeasy86 ปีที่แล้ว +1

    Thank you so much sir..I learn lof of things about Angular

  • @ashishnayak2666
    @ashishnayak2666 ปีที่แล้ว

    Salute bro🎉..to your strong effort..

  • @debajyoti.dev_
    @debajyoti.dev_ ปีที่แล้ว

    Please complete the full course 🙏🙏❤️

  • @savishan1805
    @savishan1805 8 หลายเดือนก่อน +1

    Simply we can use NgIf in notify me as well? Why we need to use ng-template, may I know the purpose?

    • @lgaedits
      @lgaedits 6 หลายเดือนก่อน

      fr. It just complicates it even more in my opinion

  • @rogeriotadeudosreis342
    @rogeriotadeudosreis342 9 หลายเดือนก่อน +1

    Thank you by tutorial

  • @Gyannea
    @Gyannea ปีที่แล้ว

    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!

  • @darcygravan7338
    @darcygravan7338 2 หลายเดือนก่อน

    template referance variable isnt declared inside *ngtemplateoutlet so shouldn't it throw an error?
    how does it still work?

  • @sagarvyas5527
    @sagarvyas5527 3 หลายเดือนก่อน

    sir cant we show notify button using *ngif = "!Product_isin_inventory"

  • @anutaNYC
    @anutaNYC 10 หลายเดือนก่อน

    Is there git for this ekart project?

  • @mohitmore9913
    @mohitmore9913 9 หลายเดือนก่อน

    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?

    • @VamsiKrishna-rd2ok
      @VamsiKrishna-rd2ok 9 หลายเดือนก่อน +3

      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.

    • @pabblo097
      @pabblo097 2 หลายเดือนก่อน

      @@VamsiKrishna-rd2ok I'd put all that stuff in the new component and use *ngIf

  • @ksas323
    @ksas323 15 วันที่ผ่านมา

    There is an important point that you forgot to add here, which is adding a variable inside the template.

  • @Moath268
    @Moath268 8 หลายเดือนก่อน

    thanks
    😀

  • @RaulGarcia-tg9xv
    @RaulGarcia-tg9xv 8 หลายเดือนก่อน

    thanks