Mobile App Quiz 3 Flashcards
difference between (ngModel) and [(ngModel)]
(ngModel) is one-way data binding (won’t see instant changes) whereas [(ngModel)] is two-way data binding (will see instant changes)
how to create and add a custom component
ionic g component myComponent
directive
used to modify behavior of an existing element; resemble css class attributes
how to generate a directive
ionic g directive myDirective
how to import a directive
import {Directive, ElementRef} from ‘@angular/core’};
pipe
transforms a value and renders out to the screen
how to generate a pipe
ionic g pipe myPipe
example of a pipe
to lower case function
how to implement a pipe
<p>{{someValue | myPipe }}</p>
injectible/service/provider
used to store and access saved data
local store is
limited
how to generate a provider
ionic g provider myProvider
- notation denotes a
template
templates
used for structural directives (shortcut for creating an embedded template)
ionic treats templates as
chunks of the DOM