Can I translate text without creating an element?
Yes, you can achieve using <ng-container>
attribute. Normally you need to wrap a text content with i18n attribute for the translation. But if you don't want to create a new DOM element just for the sake of translation, you can wrap the text in an <ng-container>
element.
<ng-container i18n>I'm not using any DOM element for translation</ng-container>
Remember that <ng-container>
is transformed into an html comment
August 03, 2022
122
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular