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

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

24
Q

Directive (attribute) event binding

A

<div>click with myClick</div>

Attribute Directive: clickable
Directive Event: myClick

25
EventEmitter example
``` // Inside child component deleteRequest = new EventEmitter(); delete() { this.deleteRequest.emit(this.hero); } // inside parent template ```
26
template variable for an event when event binding
$event | event)=actionHandlingEventParam($event
27
Two way binding equivalence example
28
NgModel Binding with change
[ngModel]="currentHero.name" | (ngModelChange)="doSomething($event)">
29
NgStyle binding
div [ngStyle]="{ 'styleVar1': boolExpression1, 'styleVar2': boolExpression2 }"
30
NgModel binding
// Module inport FormsModule
31
NgModel Binding with change
[ngModel]="currentHero.name" | (ngModelChange)="doSomething($event)">
32
Output Binding
@Output("aliasName") | public name :EventEmitter?;
33
NgSwitch example
34
Input Binding
@Input("aliasName") | public inputVarName?;
35
Output Binding
@Output("aliasName") | public name :EventEmitter?;
36
null operator
{{nullObject?.name}}
37
assert not null operator to indicate that the variable can't be null
{{nullObject!.name}}
38
any type conversion in template
$any(expression).anyProperty
39
pipe example
{{expression | converter}}