File tree Expand file tree Collapse file tree 5 files changed +14
-3
lines changed
packages/schematics/angular/workspace/files
tests/legacy-cli/e2e/tests Expand file tree Collapse file tree 5 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 16
16
"@angular/compiler" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
17
17
"@angular/core" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
18
18
"@angular/forms" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
19
- "@angular/http" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
20
19
"@angular/platform-browser" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
21
20
"@angular/platform-browser-dynamic" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
22
21
"@angular/router" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function() {
34
34
import { BrowserModule } from '@angular/platform-browser';
35
35
import { NgModule } from '@angular/core';
36
36
import { FormsModule } from '@angular/forms';
37
- import { HttpModule } from '@angular/http';
37
+ import { HttpClientModule } from '@angular/common /http';
38
38
39
39
import { AppComponent } from './app.component';
40
40
import { RouterModule } from '@angular/router';
@@ -46,7 +46,7 @@ export default function() {
46
46
imports: [
47
47
BrowserModule,
48
48
FormsModule,
49
- HttpModule ,
49
+ HttpClientModule ,
50
50
RouterModule.forRoot([
51
51
{ path: 'lazy', loadChildren: './lazy/lazy.module#LazyModule' }
52
52
])
Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ export default function () {
18
18
}
19
19
20
20
let platformServerVersion = readNgVersion ( ) ;
21
+ let httpVersion = readNgVersion ( ) ;
21
22
22
23
if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
23
24
platformServerVersion = 'github:angular/platform-server-builds' ;
25
+ httpVersion = 'github:angular/http-builds' ;
24
26
}
25
27
26
28
@@ -33,6 +35,8 @@ export default function () {
33
35
. then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
34
36
const dependencies = packageJson [ 'dependencies' ] ;
35
37
dependencies [ '@angular/platform-server' ] = platformServerVersion ;
38
+ // ServerModule depends on @angular /http regardless the app's dependency.
39
+ dependencies [ '@angular/http' ] = httpVersion ;
36
40
} )
37
41
. then ( ( ) => npm ( 'install' ) )
38
42
. then ( ( ) => ng ( 'build' , '--optimization' ) )
Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ export default function () {
19
19
}
20
20
21
21
let platformServerVersion = readNgVersion ( ) ;
22
+ let httpVersion = readNgVersion ( ) ;
22
23
23
24
if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
24
25
platformServerVersion = 'github:angular/platform-server-builds' ;
26
+ httpVersion = 'github:angular/http-builds' ;
25
27
}
26
28
27
29
return Promise . resolve ( )
@@ -134,6 +136,8 @@ export default function () {
134
136
. then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
135
137
const dependencies = packageJson [ 'dependencies' ] ;
136
138
dependencies [ '@angular/platform-server' ] = platformServerVersion ;
139
+ // ServerModule depends on @angular /http regardless the app's dependency.
140
+ dependencies [ '@angular/http' ] = httpVersion ;
137
141
} )
138
142
. then ( ( ) => npm ( 'install' ) ) )
139
143
. then ( ( ) => ng ( 'run' , 'test-project:app-shell' ) )
Original file line number Diff line number Diff line change @@ -20,9 +20,11 @@ export default function () {
20
20
}
21
21
22
22
let platformServerVersion = readNgVersion ( ) ;
23
+ let httpVersion = readNgVersion ( ) ;
23
24
24
25
if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
25
26
platformServerVersion = 'github:angular/platform-server-builds' ;
27
+ httpVersion = 'github:angular/http-builds' ;
26
28
}
27
29
28
30
// Skip this test in Angular 2/4.
@@ -34,6 +36,8 @@ export default function () {
34
36
. then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
35
37
const dependencies = packageJson [ 'dependencies' ] ;
36
38
dependencies [ '@angular/platform-server' ] = platformServerVersion ;
39
+ // ServerModule depends on @angular /http regardless the app's dependency.
40
+ dependencies [ '@angular/http' ] = httpVersion ;
37
41
} ) )
38
42
. then ( ( ) => updateJsonFile ( 'angular.json' , workspaceJson => {
39
43
const appArchitect = workspaceJson . projects [ 'test-project' ] . architect ;
You can’t perform that action at this time.
0 commit comments