Components Flashcards

1
Q

@Component

A

The @Component decorator identifies the class immediately below it as a component class, and specifies its metadata.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

setInterval()

A

JavaScript API let you run a function at regular time intervals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ngFor

A

*ngFor=”let phoneNumber of user.phone”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

ngIf

A

*ngIf=”user.phone.length”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Lifecycle of Angular hooks

A

https://angular.io/guide/lifecycle-hooks#lifecycle-event-sequence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Create a new project

A

ng new project-name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Create a new component

A

ng

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Click event handling

A

<span>Expand</span>

<span>Collapse</span>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Two way data binding

A

Use [(ngModel)]
{{inputText}}

Also import FormsModule in NgModule

import { FormsModule } from ‘@angular/forms’;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Create new module

A

ng generate module module-name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

@NgModule

A

Angular Module

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

@Injectable

A

Angular Service

How well did you know this?
1
Not at all
2
3
4
5
Perfectly