-
Notifications
You must be signed in to change notification settings - Fork 0
/
NOTES.txt
92 lines (70 loc) · 2.78 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
NPM - node's packahe manager; precisa do node.js instalado e para rodar o servidor do Angular
npm install -g @angular/cli
ng new fitness-tracker
Angular Material não se instala globalmente!
ng add @angular/material
// cria o component Signup dentro da pasta auth, no módulo app.module.ts
ng g c auth/signup --module app.module
ng g c auth/login --module app.module
ng g c training --module app.module
ng g c training/current-training --module app.module
ng g c training/new-training --module app.module
ng g c training/past-trainings --module app.module
ng g c welcome --module app.module
Angular Flex Layout (uses CSS Flexbox)
npm install @angular/flex-layout --save
https://github.com/angular/flex-layout/wiki/API-Documentation
https://github.com/angular/flex-layout/wiki/Declarative-API-Overview
https://github.com/angular/flex-layout/wiki/Using-Angular-CLI
https://github.com/angular/flex-layout/wiki/Responsive-API
ng g c navigation/header --module app.module
ng g c navigation/sidenav-list --module app.module
/**** ViewChild ****/
Angular 9/10:
● if accessed in ngOnInit(): @ViewChild('myReference', { static: true }) myElement: ElementRef;
● otherwise: @ViewChild('myReference') myElement: ElementRef;
The same applies to @ContentChild (introduced later in the course).
*/
https://github.com/angular/angularfire
/****************/
/*** FIREBASE ***/
/****************/
// from https://github.com/angular/angularfire/blob/master/docs/install-and-setup.md
>ng add @angular/fire
// from video lesson
> npm install @angularfire firebase --save (wrong)
// from [Tip] Project Update Guide thread discussion
> npm i firebase
> npm i @angular/fire
(what i used)> npm install @angular/fire firebase --save
// Firestore rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// This rule allows anyone with your database reference to view, edit,
// and delete all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Firestore database will be denied until you Update
// your rules
match /{document=**} {
allow read, write: if request.auth != null;
}
}
}
/**
* PRODUCTION ENVIRONMENT
*/
> ng build --prod
/**
* NgRx
*/
> npm install --save @ngrx/store
1) export to Excel, https://blog.bitsrc.io/exporting-data-to-excel-in-angular-1d1194e8be29
> npm install ngx-bootstrap xlsx file-saver --save
2) export to PDF
https://www.c-sharpcorner.com/article/client-side-pdf-generation-in-angular-with-pdfmake/
pull test2