File tree Expand file tree Collapse file tree 9 files changed +40
-20
lines changed
Expand file tree Collapse file tree 9 files changed +40
-20
lines changed Original file line number Diff line number Diff line change 1+ # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+ # For additional information regarding the format and rule options, please see:
3+ # https://github.com/browserslist/browserslist#queries
4+
5+ # You can see what browsers were selected by your queries by running:
6+ # npx browserslist
7+
8+ > 0.5%
9+ last 2 versions
10+ Firefox ESR
11+ not dead
12+ not IE 9-11 # For IE 9-11 support, remove 'not'.
Original file line number Diff line number Diff line change 1+ {
2+ "compilerOptions" : {
3+ "module" : " commonjs" ,
4+ "lib" : [" es2017" ]
5+ }
6+ }
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ import {ReactiveFormsModule} from "@angular/forms";
1111import { environment } from '../environments/environment' ;
1212import { ServiceWorkerModule } from '@angular/service-worker' ;
1313
14- import 'rxjs/add/operator/switchMap' ;
15- import 'rxjs/add/operator/map' ;
16- import 'rxjs/add/operator/shareReplay' ;
17- import 'rxjs/add/operator/do' ;
18- import 'rxjs/add/operator/filter' ;
19- import 'rxjs/add/operator/catch' ;
20- import 'rxjs/add/operator/first' ;
21- import 'rxjs/add/observable/of' ;
14+
15+
16+
17+
18+
19+
20+
21+
2222import { BrowserAnimationsModule } from "@angular/platform-browser/animations" ;
2323import { AppRoutingModule } from "./app-routing.module" ;
2424import { NewsletterService } from "./services/newsletter.service" ;
Original file line number Diff line number Diff line change 11import { Component , OnInit } from '@angular/core' ;
22import { LessonsService } from "../services/lessons.service" ;
3- import { Observable } from " rxjs/Observable" ;
3+ import { Observable , of } from ' rxjs' ;
44import { Lesson } from "../model/lesson" ;
55import { SwPush } from "@angular/service-worker" ;
66import { NewsletterService } from "../services/newsletter.service" ;
7+ import { catchError } from 'rxjs/operators' ;
78
89@Component ( {
910 selector : 'lessons' ,
@@ -32,7 +33,7 @@ export class LessonsComponent implements OnInit {
3233
3334
3435 loadLessons ( ) {
35- this . lessons$ = this . lessonsService . loadAllLessons ( ) . catch ( err => Observable . of ( [ ] ) ) ;
36+ this . lessons$ = this . lessonsService . loadAllLessons ( ) . pipe ( catchError ( err => of ( [ ] ) ) ) ;
3637 }
3738
3839 subscribeToNotifications ( ) {
Original file line number Diff line number Diff line change 22import { Injectable } from "@angular/core" ;
33import { HttpClient } from "@angular/common/http" ;
44import { Lesson } from "../model/lesson" ;
5- import { Observable } from "rxjs/Observable" ;
5+ import { Observable } from "rxjs" ;
6+ import { map } from 'rxjs/operators' ;
67
78
89@Injectable ( )
@@ -14,7 +15,9 @@ export class LessonsService {
1415
1516 loadAllLessons ( ) : Observable < Lesson [ ] > {
1617 return this . http . get < any > ( '/api/lessons' )
17- . map ( res => res . lessons ) ;
18+ . pipe (
19+ map ( res => res . lessons )
20+ )
1821 }
1922
2023 findLessonById ( id :number ) {
Original file line number Diff line number Diff line change 33 "compilerOptions" : {
44 "outDir" : " ../out-tsc/app" ,
55 "baseUrl" : " ./" ,
6- "module" : " es2015" ,
76 "types" : []
87 },
98 "exclude" : [
Original file line number Diff line number Diff line change 33 "compilerOptions" : {
44 "outDir" : " ../out-tsc/spec" ,
55 "baseUrl" : " ./" ,
6- "module" : " commonjs" ,
7- "target" : " es5" ,
86 "types" : [
97 " jasmine" ,
108 " node"
Original file line number Diff line number Diff line change 11{
22 "compileOnSave" : false ,
33 "compilerOptions" : {
4+ "module" : " esnext" ,
45 "outDir" : " ./dist/out-tsc" ,
56 "sourceMap" : true ,
67 "declaration" : false ,
78 "moduleResolution" : " node" ,
89 "emitDecoratorMetadata" : true ,
910 "experimentalDecorators" : true ,
10- "target" : " es5 " ,
11+ "target" : " es2015 " ,
1112 "typeRoots" : [
1213 " node_modules/@types"
1314 ],
Original file line number Diff line number Diff line change 125125 " app" ,
126126 " kebab-case"
127127 ],
128- "use-input-property-decorator " : true ,
129- "use-output-property-decorator " : true ,
130- "use -host-property-decorator " : true ,
128+ "no-inputs-metadata-property " : true ,
129+ "no-outputs-metadata-property " : true ,
130+ "no -host-metadata-property " : true ,
131131 "no-input-rename" : true ,
132132 "no-output-rename" : true ,
133- "use-life-cycle -interface" : true ,
133+ "use-lifecycle -interface" : true ,
134134 "use-pipe-transform-interface" : true ,
135135 "component-class-suffix" : true ,
136136 "directive-class-suffix" : true ,
You can’t perform that action at this time.
0 commit comments