Vs

Vs

ng-container is mentioned in the official documentation but I'm still trying to understand how it works and what are use cases.

It is particularly mentioned in ngPlural and ngSwitch directives.

Does <ng-container> do the same thing as <template> or does it depend on whether a directive was written to use one of them?

Are

<ng-container *ngPluralCase="'=0'">there is nothing</ng-container>

and

<template [ngPluralCase]="'=0'">there is nothing</template>

supposed to be the same?

How do we choose one of them?

How can <ng-container> be used in a custom directive?

0

5 Answers

Edit : Now it is documented

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.