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 1616 "@angular/compiler" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
1717 "@angular/core" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
1818 "@angular/forms" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
19- "@angular/http" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
2019 "@angular/platform-browser" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
2120 "@angular/platform-browser-dynamic" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
2221 "@angular/router" : " <%= experimentalAngularNext ? 'next' : latestVersions.Angular %>" ,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export default function() {
3434 import { BrowserModule } from '@angular/platform-browser';
3535 import { NgModule } from '@angular/core';
3636 import { FormsModule } from '@angular/forms';
37- import { HttpModule } from '@angular/http';
37+ import { HttpClientModule } from '@angular/common /http';
3838
3939 import { AppComponent } from './app.component';
4040 import { RouterModule } from '@angular/router';
@@ -46,7 +46,7 @@ export default function() {
4646 imports: [
4747 BrowserModule,
4848 FormsModule,
49- HttpModule ,
49+ HttpClientModule ,
5050 RouterModule.forRoot([
5151 { path: 'lazy', loadChildren: './lazy/lazy.module#LazyModule' }
5252 ])
Original file line number Diff line number Diff line change @@ -18,9 +18,11 @@ export default function () {
1818 }
1919
2020 let platformServerVersion = readNgVersion ( ) ;
21+ let httpVersion = readNgVersion ( ) ;
2122
2223 if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
2324 platformServerVersion = 'github:angular/platform-server-builds' ;
25+ httpVersion = 'github:angular/http-builds' ;
2426 }
2527
2628
@@ -33,6 +35,8 @@ export default function () {
3335 . then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
3436 const dependencies = packageJson [ 'dependencies' ] ;
3537 dependencies [ '@angular/platform-server' ] = platformServerVersion ;
38+ // ServerModule depends on @angular /http regardless the app's dependency.
39+ dependencies [ '@angular/http' ] = httpVersion ;
3640 } )
3741 . then ( ( ) => npm ( 'install' ) )
3842 . then ( ( ) => ng ( 'build' , '--optimization' ) )
Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ export default function () {
1919 }
2020
2121 let platformServerVersion = readNgVersion ( ) ;
22+ let httpVersion = readNgVersion ( ) ;
2223
2324 if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
2425 platformServerVersion = 'github:angular/platform-server-builds' ;
26+ httpVersion = 'github:angular/http-builds' ;
2527 }
2628
2729 return Promise . resolve ( )
@@ -134,6 +136,8 @@ export default function () {
134136 . then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
135137 const dependencies = packageJson [ 'dependencies' ] ;
136138 dependencies [ '@angular/platform-server' ] = platformServerVersion ;
139+ // ServerModule depends on @angular /http regardless the app's dependency.
140+ dependencies [ '@angular/http' ] = httpVersion ;
137141 } )
138142 . then ( ( ) => npm ( 'install' ) ) )
139143 . then ( ( ) => ng ( 'run' , 'test-project:app-shell' ) )
Original file line number Diff line number Diff line change @@ -20,9 +20,11 @@ export default function () {
2020 }
2121
2222 let platformServerVersion = readNgVersion ( ) ;
23+ let httpVersion = readNgVersion ( ) ;
2324
2425 if ( getGlobalVariable ( 'argv' ) [ 'ng-snapshots' ] ) {
2526 platformServerVersion = 'github:angular/platform-server-builds' ;
27+ httpVersion = 'github:angular/http-builds' ;
2628 }
2729
2830 // Skip this test in Angular 2/4.
@@ -34,6 +36,8 @@ export default function () {
3436 . then ( ( ) => updateJsonFile ( 'package.json' , packageJson => {
3537 const dependencies = packageJson [ 'dependencies' ] ;
3638 dependencies [ '@angular/platform-server' ] = platformServerVersion ;
39+ // ServerModule depends on @angular /http regardless the app's dependency.
40+ dependencies [ '@angular/http' ] = httpVersion ;
3741 } ) )
3842 . then ( ( ) => updateJsonFile ( 'angular.json' , workspaceJson => {
3943 const appArchitect = workspaceJson . projects [ 'test-project' ] . architect ;
You can’t perform that action at this time.
0 commit comments