Complete the code to add a type annotation for the component's title property.
export class AppComponent { title: [1] = 'Hello Angular'; }
The title property holds text, so it should be typed as string.
Complete the code to type the input property correctly.
import { Component, Input } from '@angular/core'; @Component({ selector: 'app-child', template: '<p>{{name}}</p>' }) export class ChildComponent { @Input() name: [1]; }
The name input is expected to be text, so it should be typed as string.
Fix the error by adding the correct type annotation for the count property.
export class CounterComponent { count: [1] = 0; }
The count property holds a number, so it should be typed as number.
Fill both blanks to type the event handler method parameters correctly.
export class ButtonComponent { onClick(event: [1], value: [2]) { console.log(event, value); } }
The event parameter is a mouse event, so MouseEvent is correct. The value is text, so string fits.
Fill all three blanks to type the component properties correctly.
export class ProfileComponent { username: [1]; age: [2]; isActive: [3] = true; }
username is text, so string. age is a number, so number. isActive is true/false, so boolean.
