Mobile App Quiz 3 Flashcards

1
Q

difference between (ngModel) and [(ngModel)]

A

(ngModel) is one-way data binding (won’t see instant changes) whereas [(ngModel)] is two-way data binding (will see instant changes)

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

how to create and add a custom component

A

ionic g component myComponent

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

directive

A

used to modify behavior of an existing element; resemble css class attributes

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

how to generate a directive

A

ionic g directive myDirective

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

how to import a directive

A

import {Directive, ElementRef} from ‘@angular/core’};

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

pipe

A

transforms a value and renders out to the screen

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

how to generate a pipe

A

ionic g pipe myPipe

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

example of a pipe

A

to lower case function

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

how to implement a pipe

A

<p>{{someValue | myPipe }}</p>

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

injectible/service/provider

A

used to store and access saved data

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

local store is

A

limited

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

how to generate a provider

A

ionic g provider myProvider

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
  • notation denotes a
A

template

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

templates

A

used for structural directives (shortcut for creating an embedded template)

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

ionic treats templates as

A

chunks of the DOM

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

templates can be

A

dynamically manipulated

17
Q

the *ngIf template allows angular to

A

apply some logic to the code before rendering

18
Q

interpolations

A

evaluate the expression and renders the result

19
Q

example on an interpolation

A

<p>Hi, {{name}}</p>

will reference name variable in the typescript and output it here

20
Q

looping

A

like an enhanced for loop in java
{{item}}

you must supply an array items in the class

21
Q

decision structure

A

if but no else

<div></div> will only render that div if the boolean is true

22
Q

switch

A

<div>
<p>Text</p>
...
<p>Default</p></div>

23
Q

[hidden]=”whatever”

A

do not use! this is property binding - it references items from the class and only is using CSS to hide the elements, meaning they are still being rendered and are still part of the DOM

24
Q

use ? over hidden

A

ngIf

25
Q

slots

A

control how elements are displayed (placeholder for where injected)

26
Q

slot start means

A

left

27
Q

slot end means

A

right