Bird
0
0

Given the pipe usage {{ 1234.5678 | number:'1.0-2' }}, what will be the displayed output?

medium📝 component behavior Q4 of 15
Angular - Pipes
Given the pipe usage {{ 1234.5678 | number:'1.0-2' }}, what will be the displayed output?
A1234.56
B1234.5678
C1,234.57
D1,234.5
Step-by-Step Solution
Solution:
  1. Step 1: Understand number pipe format '1.0-2'

    Minimum integer digits: 1, minimum fraction digits: 0, maximum fraction digits: 2.
  2. Step 2: Apply formatting to 1234.5678

    Number rounds to 2 decimal places: 1234.57, with comma as thousand separator.
  3. Final Answer:

    1,234.57 -> Option C
  4. Quick Check:

    Number pipe rounds decimals correctly [OK]
Quick Trick: Number pipe rounds decimals within min-max range [OK]
Common Mistakes:
  • Ignoring rounding rules
  • Missing thousand separator
  • Confusing min and max decimal digits

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Angular Quizzes