Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to display the value of title using Angular interpolation.
Angular
<h1>[1]</h1> Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding parentheses like title() which is not valid for interpolation.
Using square brackets which are for property binding, not interpolation.
✗ Incorrect
In Angular, double curly braces {{ }} are used to display the value of a component property. Here, {{title}} shows the value of the
title property.2fill in blank
mediumComplete the code to interpolate the user.name property inside a paragraph.
Angular
<p>Hello, [1]!</p> Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using hyphens which are invalid in property names.
Using brackets which are not supported in interpolation.
✗ Incorrect
To access nested properties in Angular interpolation, use dot notation like {{user.name}}.
3fill in blank
hardFix the error in the interpolation to correctly display the count property.
Angular
<span>[1]</span> Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Adding parentheses like count() which is invalid in interpolation.
Adding semicolons which cause syntax errors.
✗ Incorrect
Interpolation expects a property name without parentheses or semicolons. Use {{count}} to display the value.
4fill in blank
hardFill both blanks to interpolate the user.firstName and user.lastName properties separated by a space.
Angular
<p>[1] [2]</p>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using underscores instead of camelCase property names.
Mixing property name styles causing errors.
✗ Incorrect
Use dot notation for both properties inside interpolation to display first and last names.
5fill in blank
hardFill all three blanks to interpolate the uppercase title, the author.name, and the year properties.
Angular
<h2>[1] by [2], [3]</h2>
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plain {{title}} instead of {{title.toUpperCase()}} for uppercase display.
Incorrect syntax for nested properties like author.name.
✗ Incorrect
Angular interpolation supports parameterless method calls like {{title.toUpperCase()}}. Use {{title.toUpperCase()}} by {{author.name}}, {{year}}.