Skip to content

Commit d876dfa

Browse files
updated to Angular 12
1 parent 3bb2001 commit d876dfa

File tree

8 files changed

+5990
-6712
lines changed

8 files changed

+5990
-6712
lines changed

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,13 @@ Builds a user authentication app using Angular 11 and google Firebase.
2626

2727
* Firebase Real-time database used, rules set to test:
2828

29-
```json
30-
{
31-
"rules": {
32-
".read": true,
33-
".write": true
34-
}
35-
}
36-
37-
29+
```html
30+
<div *ngIf="user.uid | async as uid; else login">
31+
The user is logged in with user id: {{ uid }}
32+
<div *ngIf="user.isAdmin | async">The user also has ADMIN superpowers.</div>
33+
<div><button (click)="user.logout()">Logout</button></div>
34+
</div>
35+
<ng-template #login> You need to login: <button (click)="user.login()">Login</button> </ng-template>
3836
```
3937

4038
* This is just for development, not production, so the whole firebase module is used. This error is shown in the dev tools console: _When deploying Firebase apps to production, it is advisable to only import the individual SDK components you intend to use._
@@ -45,7 +43,7 @@ Builds a user authentication app using Angular 11 and google Firebase.
4543

4644
## :signal_strength: Technologies
4745

48-
* [Angular v11](https://angular.io/)
46+
* [Angular v12](https://angular.io/)
4947
* [Firebase v8](https://firebase.google.com/)
5048
* [Reactive Extensions for Javascript -RxJS v6](https://angular.io/guide/rx-library) library used for reactive programming using the observable type.
5149
* [RxJS SwitchMap](https://www.learnrxjs.io/learn-rxjs/operators/transformation/switchmap) On each emission **the previous inner observable is cancelled and the new observable is subscribed**; switch to a new observable. Only one subscription at a time - seems ideal for login applications

angular.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"aot": true,
1716
"outputPath": "dist/angular-firebase-auth-service",
1817
"index": "src/index.html",
1918
"main": "src/main.ts",
@@ -26,7 +25,13 @@
2625
"styles": [
2726
"src/styles.css"
2827
],
29-
"scripts": []
28+
"scripts": [],
29+
"vendorChunk": true,
30+
"extractLicenses": false,
31+
"buildOptimizer": false,
32+
"sourceMap": true,
33+
"optimization": false,
34+
"namedChunks": true
3035
},
3136
"configurations": {
3237
"production": {
@@ -41,7 +46,6 @@
4146
"sourceMap": false,
4247
"extractCss": true,
4348
"namedChunks": false,
44-
"aot": true,
4549
"extractLicenses": true,
4650
"vendorChunk": false,
4751
"buildOptimizer": true,

0 commit comments

Comments
 (0)