File tree 4 files changed +7
-12
lines changed
4 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 53
53
"@angularclass/hmr-loader" : " ^3.0.4" ,
54
54
"reflect-metadata" : " ^0.1.3" ,
55
55
"rxjs" : " ^6.0.0" ,
56
- "rxjs-compat" : " ^6.0.0" ,
57
56
"zone.js" : " ^0.8.12" ,
58
57
"@angular/common" : " ^6.0.4" ,
59
58
"@angular/compiler" : " ^6.0.4" ,
89
88
<% if(filters.bootstrap) { %>
90
89
"bootstrap" : " ~3.3.7" ,
91
90
<% if(filters.uibootstrap) { %>
92
- "ngx-bootstrap" : " ~1.6.3 " ,<% } %>
91
+ "ngx-bootstrap" : " ^3.0.0 " ,<% } %>
93
92
<% if(filters.sass) { %>
94
93
"bootstrap-sass" : " ~3.3.7" ,<% } %>
95
94
<% if(filters.stylus) { %>
Original file line number Diff line number Diff line change 1
1
import { Component , OnInit < % if ( filters . ws ) { % > , OnDestroy< % } % > } from '@angular/core' ;
2
- import { HttpClient } from '@angular/common/http' ;
3
- import 'rxjs/add/operator/map' ; < % if ( filters . ws ) { % >
2
+ import { HttpClient } from '@angular/common/http' ; < % if ( filters . ws ) { % >
4
3
import { SocketService } from '../../components/socket/socket.service' ; < % } % > < % if ( filters . ts ) { % >
5
4
6
5
interface Thing {
Original file line number Diff line number Diff line change 1
1
import { Injectable , EventEmitter , Output } from '@angular/core' ;
2
2
import { UserService } from './user.service' ;
3
3
import { HttpClient } from '@angular/common/http' ;
4
- import 'rxjs/add/operator/toPromise' ;
5
4
import { safeCb } from '../util' ;
6
5
import constants from '../../app/app.constants' ;
7
6
Original file line number Diff line number Diff line change 1
1
// @flow
2
2
import { Injectable } from '@angular/core' ;
3
3
import { HttpClient } from '@angular/common/http' ;
4
- import { Observable } from 'rxjs/Rx' ;
5
- import 'rxjs/add/operator/map' ;
6
- import 'rxjs/add/operator/catch' ;
7
- import 'rxjs/add/operator/toPromise' ;
4
+ import { Observable } from 'rxjs' ;
5
+ import { map } from 'rxjs/operators' ;
8
6
9
7
type UserType = {
10
8
// TODO: use Mongoose model
@@ -22,10 +20,10 @@ export class UserService {
22
20
}
23
21
24
22
query ( ) : Observable < UserType [ ] > {
25
- return this . http . get ( '/api/users/' ) as Observable < UserType [ ] > ;
23
+ return this . http . get ( '/api/users/' ) < % if ( filters . ts ) { % > as Observable < UserType [ ] > < % } % > ;
26
24
}
27
25
get ( user < % if ( filters . ts ) { % > : UserType < % } % > = { id : 'me' } ) : Observable < UserType > {
28
- return this . http . get ( `/api/users/${ user . id || user . _id } ` ) as Observable < UserType > ;
26
+ return this . http . get ( `/api/users/${ user . id || user . _id } ` ) < % if ( filters . ts ) { % > as Observable < UserType > < % } % > ;
29
27
}
30
28
create ( user : UserType ) {
31
29
return this . http . post ( '/api/users/' , user ) ;
@@ -35,6 +33,6 @@ export class UserService {
35
33
}
36
34
remove ( user ) {
37
35
return this . http . delete ( `/api/users/${ user . id || user . _id } ` )
38
- . map ( ( ) => user ) ;
36
+ . pipe ( map ( ( ) => user ) ) ;
39
37
}
40
38
}
You can’t perform that action at this time.
0 commit comments