File tree 9 files changed +40
-20
lines changed
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";
11
11
import { environment } from '../environments/environment' ;
12
12
import { ServiceWorkerModule } from '@angular/service-worker' ;
13
13
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
+
22
22
import { BrowserAnimationsModule } from "@angular/platform-browser/animations" ;
23
23
import { AppRoutingModule } from "./app-routing.module" ;
24
24
import { NewsletterService } from "./services/newsletter.service" ;
Original file line number Diff line number Diff line change 1
1
import { Component , OnInit } from '@angular/core' ;
2
2
import { LessonsService } from "../services/lessons.service" ;
3
- import { Observable } from " rxjs/Observable" ;
3
+ import { Observable , of } from ' rxjs' ;
4
4
import { Lesson } from "../model/lesson" ;
5
5
import { SwPush } from "@angular/service-worker" ;
6
6
import { NewsletterService } from "../services/newsletter.service" ;
7
+ import { catchError } from 'rxjs/operators' ;
7
8
8
9
@Component ( {
9
10
selector : 'lessons' ,
@@ -32,7 +33,7 @@ export class LessonsComponent implements OnInit {
32
33
33
34
34
35
loadLessons ( ) {
35
- this . lessons$ = this . lessonsService . loadAllLessons ( ) . catch ( err => Observable . of ( [ ] ) ) ;
36
+ this . lessons$ = this . lessonsService . loadAllLessons ( ) . pipe ( catchError ( err => of ( [ ] ) ) ) ;
36
37
}
37
38
38
39
subscribeToNotifications ( ) {
Original file line number Diff line number Diff line change 2
2
import { Injectable } from "@angular/core" ;
3
3
import { HttpClient } from "@angular/common/http" ;
4
4
import { Lesson } from "../model/lesson" ;
5
- import { Observable } from "rxjs/Observable" ;
5
+ import { Observable } from "rxjs" ;
6
+ import { map } from 'rxjs/operators' ;
6
7
7
8
8
9
@Injectable ( )
@@ -14,7 +15,9 @@ export class LessonsService {
14
15
15
16
loadAllLessons ( ) : Observable < Lesson [ ] > {
16
17
return this . http . get < any > ( '/api/lessons' )
17
- . map ( res => res . lessons ) ;
18
+ . pipe (
19
+ map ( res => res . lessons )
20
+ )
18
21
}
19
22
20
23
findLessonById ( id :number ) {
Original file line number Diff line number Diff line change 3
3
"compilerOptions" : {
4
4
"outDir" : " ../out-tsc/app" ,
5
5
"baseUrl" : " ./" ,
6
- "module" : " es2015" ,
7
6
"types" : []
8
7
},
9
8
"exclude" : [
Original file line number Diff line number Diff line change 3
3
"compilerOptions" : {
4
4
"outDir" : " ../out-tsc/spec" ,
5
5
"baseUrl" : " ./" ,
6
- "module" : " commonjs" ,
7
- "target" : " es5" ,
8
6
"types" : [
9
7
" jasmine" ,
10
8
" node"
Original file line number Diff line number Diff line change 1
1
{
2
2
"compileOnSave" : false ,
3
3
"compilerOptions" : {
4
+ "module" : " esnext" ,
4
5
"outDir" : " ./dist/out-tsc" ,
5
6
"sourceMap" : true ,
6
7
"declaration" : false ,
7
8
"moduleResolution" : " node" ,
8
9
"emitDecoratorMetadata" : true ,
9
10
"experimentalDecorators" : true ,
10
- "target" : " es5 " ,
11
+ "target" : " es2015 " ,
11
12
"typeRoots" : [
12
13
" node_modules/@types"
13
14
],
Original file line number Diff line number Diff line change 125
125
" app" ,
126
126
" kebab-case"
127
127
],
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 ,
131
131
"no-input-rename" : true ,
132
132
"no-output-rename" : true ,
133
- "use-life-cycle -interface" : true ,
133
+ "use-lifecycle -interface" : true ,
134
134
"use-pipe-transform-interface" : true ,
135
135
"component-class-suffix" : true ,
136
136
"directive-class-suffix" : true ,
You can’t perform that action at this time.
0 commit comments