XANGL10918 InstructorPhilipM-1
Good morning
10 E - 1 E
1:45 E - 4:45 E
Book for both classes Ang 6 (Ang 17)
VS Code > Day 3 folder projects
html, css, basic coding
html 0-10
angular 0-10
ang version? 15,16,17
ng --version
ng cmd name attrs/options/switches
ng g c
generate g
component c
ng new angular-hello-world
ng serve --open
ng build > app html and js
ng serve > dev server port 4200 --port 9001
--open open browser
Controller stable
View
1. UI/UX
2. api calls
3. timer
break 11:25 E - 11:40 E
page 12-18 component
philipm@onlc.com Philip Matusiak
ng generate component comp-name
folder/ 4 files
md cart > command
> UPDATES module.ts
ng g c hello-world
1. .html view
2. .ts controller class
3. .spec.ts specs and testing
4. .css
views
comps
css
@Decorator
object > class
myFunction () varName ()
myFunction() dec func()
z=x+y
z = x+y
z= x + y
z = x+ y
; end of operation
\n
z = x + y;
print(z)
@Injectable()
class
Philip
ng g c hello-world-inline
variable class> global or local var
variable view > template var { varName }
ng g c user-item
varName type > property of an object
fName string
lName string
age int
Contact > fName, lName,age
Class Contacts > Contact > 3 props
myfunc(x: number,y: number) {
z = x + y
}
myfunc(5,3)
Data Sets
Arrays [] ['Philip', 21, True, 21] len(4) range 0-3, [1C]
Sets {} {'Philip', 21, True, 21} len(3)
Tuple ('Philip', 21, True, 21) can not change
Dictionary { key:value } key!dup valuesdup
ng g c user-list
[1,2,3,4]
1. string
2. array
Lunch 1:05 E - 1:50 E
philipm@onlc.com / 800.288.8221
page 23 *ngFor (page 114)
child comp to call parent
user-item view user-list data set
loop
for
while
switch / case
Excel Formula in a Cell
Loop in Attr
directive
input DOM name attr fname value
2 way binding / directive *ngFor
1 way binding / directive *ngModel
1 way
*ngFor > let x of ys
x local var in template
ys data?
names: string[] controller class
Hello, my name is {{ name }} view (html)