So you cannot use multiple structural directives (*ngFor, *ngIf) together in the same tag, same with any event binding cause they all manupilate the DOM and might create some conflicts. Got it!
We will use ng-containers and ng-templates , when we are need to reuse the same template for different conditions. In those cases it saves lots of code and time .
Awesome content. Worth watching. Please continue with the content!
Informative work, thank you.
great video
Very useful !!!
use ng-container when 2 directive to used(substitute to div) and and with ng-template (if else) if condition with ng-template
Please make the course on Salesforce commerce coloud with SFRA
So you cannot use multiple structural directives (*ngFor, *ngIf) together in the same tag, same with any event binding cause they all manupilate the DOM and might create some conflicts. Got it!
never understood why using containers or template. You just do and then and you save a lot of writing...
I think it makes sense when you use a big template (when there are a lot of elements inside)
@@advance5189 even if you are using big section of HTML, you can just put everything inside a div and do and *ngIf on that div
never understood why using containers or template. You just do and then and you save a lot of writing...
We will use ng-containers and ng-templates , when we are need to reuse the same template for different conditions. In those cases it saves lots of code and time .