Displaying Data Flashcards

1
Q

Interpolation example

A

{{interpolated content}}

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

Interpolation example

A

{{interpolated content}}

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

How do you write multiline string

A

The backtick: ‘

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

declare a component in html

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

Structural direct for if statements

A

*ngIf=”booleanExpression; then templateForFalse

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

declare a component in html

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

Structural directive for for loops

A

*ngFor=”let item of items”

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

Structural direct for if statements

A

*ngIf=”booleanExpression; then templateForFalse

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

Declare a template reference variable to refer to element tags.

A
#variableName
Useful Fact: takes precedence over other variables available in the template
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Do templates have access to global variables such as “window” or “document”?

A

Nope

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

Rules for template expressions

A

No visible side effects
Quick execution
Simplicity
Idempotence

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

Action triggered by event raised that is binding a an element, component, or directive.

A

Template statement

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

Which can chain statements and assign values? Template expression or template statements?

A

Template statements

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

One way from source to view target binding

A

{{expression}}
[target]=”expression”
bind-target=”expression”

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

One-way
from view target
to data source

A

(target)=”statement”

on-target=”statement”

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

Two-way

A

[(target)]=”expression”

bindon-target=”expression”

17
Q

Difference between html properties and attributes.

A

Attributes initialize properties. Properties can change.

18
Q

Class property bindng

A

<div><div></div></div>

19
Q

Input binding

A

<div></div>

20
Q

Attribute binding example

A
21
Q

class binding example

A

<div></div>

22
Q

Style binding example

A

<div></div>

23
Q

Style binding example with value type example

A

Big

24
Q

Directive (attribute) event binding

A

<div>click with myClick</div>

Attribute Directive: clickable
Directive Event: myClick

25
Q

EventEmitter example

A
// Inside child component
deleteRequest = new EventEmitter();
delete() {
  this.deleteRequest.emit(this.hero);
}
// inside parent template
26
Q

template variable for an event when event binding

A

$event

event)=actionHandlingEventParam($event

27
Q

Two way binding equivalence example

A
28
Q

NgModel Binding with change

A

[ngModel]=”currentHero.name”

(ngModelChange)=”doSomething($event)”>

29
Q

NgStyle binding

A

div [ngStyle]=”{
‘styleVar1’: boolExpression1,
‘styleVar2’: boolExpression2
}”

30
Q

NgModel binding

A

// Module inport FormsModule

31
Q

NgModel Binding with change

A

[ngModel]=”currentHero.name”

(ngModelChange)=”doSomething($event)”>

32
Q

Output Binding

A

@Output(“aliasName”)

public name :EventEmitter?;

33
Q

NgSwitch example

A

<div>

</div>

34
Q

Input Binding

A

@Input(“aliasName”)

public inputVarName?;

35
Q

Output Binding

A

@Output(“aliasName”)

public name :EventEmitter?;

36
Q

null operator

A

{{nullObject?.name}}

37
Q

assert not null operator to indicate that the variable can’t be null

A

{{nullObject!.name}}

38
Q

any type conversion in template

A

$any(expression).anyProperty

39
Q

pipe example

A

{{expression | converter}}