Bird
0
0

What is the effect of adding a custom ID like i18n="@@welcomeMsg" to a text element in Angular?

medium📝 Predict Output Q5 of 15
Angular - Internationalization and Accessibility
What is the effect of adding a custom ID like i18n="@@welcomeMsg" to a text element in Angular?
AIt assigns a unique identifier for the translation message
BIt changes the element's CSS class to 'welcomeMsg'
CIt disables translation for that element
DIt triggers an Angular event named 'welcomeMsg'
Step-by-Step Solution
Solution:
  1. Step 1: Understand the use of @@ in i18n

    The @@ prefix defines a custom ID for the translation message.
  2. Step 2: Identify the purpose of the custom ID

    This ID helps translators and tools uniquely identify the message for reuse or reference.
  3. Final Answer:

    It assigns a unique identifier for the translation message -> Option A
  4. Quick Check:

    Custom ID with @@ means unique translation ID = C [OK]
Quick Trick: Use @@ to set a unique translation message ID [OK]
Common Mistakes:
  • Confusing ID with CSS class
  • Thinking it disables translation
  • Assuming it triggers events

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes