diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts index a2d8771..05ac4da 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-details/album-details.ts @@ -13,11 +13,7 @@ export class AlbumDetails { public albumData: models.Album; constructor(http: Http, routeParam: router.RouteParams) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/albums/' + routeParam.params['albumId'], options).subscribe(result => { + http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { this.albumData = result.json(); }); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts index efb5a3b..4b83c3b 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/album-edit/album-edit.ts @@ -24,14 +24,10 @@ export class AlbumEdit { private _http: Http; constructor(fb: FormBuilder, http: Http, routeParam: router.RouteParams) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - this._http = http; var albumId = parseInt(routeParam.params['albumId']); - http.get('/api/albums/' + albumId, options).subscribe(result => { + http.get('/api/albums/' + albumId).subscribe(result => { var json = result.json(); this.originalAlbum = json; (this.form.controls['Title']).updateValue(json.Title); @@ -41,11 +37,11 @@ export class AlbumEdit { (this.form.controls['AlbumArtUrl']).updateValue(json.AlbumArtUrl); }); - http.get('/api/artists/lookup', options).subscribe(result => { + http.get('/api/artists/lookup').subscribe(result => { this.artists = result.json(); }); - http.get('/api/genres/genre-lookup', options).subscribe(result => { + http.get('/api/genres/genre-lookup').subscribe(result => { this.genres = result.json(); }); diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts index bc00250..989d6e9 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/admin/albums-list/albums-list.ts @@ -45,12 +45,8 @@ export class AlbumsList { } refreshData() { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - var sortBy = this._sortBy + (this._sortByDesc ? ' DESC' : ''); - this._http.get(`/api/albums?page=${ this._pageIndex }&pageSize=50&sortBy=${ sortBy }`, options).subscribe(result => { + this._http.get(`/api/albums?page=${ this._pageIndex }&pageSize=50&sortBy=${ sortBy }`).subscribe(result => { var json = result.json(); this.rows = json.Data; diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts index 901209e..cd83aa4 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/app/app.ts @@ -24,12 +24,8 @@ import * as models from '../../models/models'; export class App { public genres: models.Genre[]; - constructor(http: Http) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/genres/menu', options).subscribe(result => { + constructor(http: Http) { + http.get('/api/genres/menu').subscribe(result => { this.genres = result.json(); }); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts index 70fe2c9..61d7d4e 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/album-details/album-details.ts @@ -11,11 +11,7 @@ export class AlbumDetails { public albumData: models.Album; constructor(http: Http, routeParam: router.RouteParams) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/albums/' + routeParam.params['albumId'], options).subscribe(result => { + http.get('/api/albums/' + routeParam.params['albumId']).subscribe(result => { this.albumData = result.json(); }); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts index f91d1fb..0571cc8 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genre-contents/genre-contents.ts @@ -13,11 +13,7 @@ export class GenreContents { public albums: models.Album[]; constructor(http: Http, routeParam: router.RouteParams) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get(`/api/genres/${ routeParam.params['genreId'] }/albums`, options).subscribe(result => { + http.get(`/api/genres/${ routeParam.params['genreId'] }/albums`).subscribe(result => { this.albums = result.json(); }); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts index 6a709f5..f45b77a 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/genres-list/genres-list.ts @@ -12,11 +12,7 @@ export class GenresList { public genres: models.Genre[]; constructor(http: Http) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/genres', options).subscribe(result => { + http.get('/api/genres').subscribe(result => { this.genres = result.json(); }); } diff --git a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts index 503b97d..51989da 100644 --- a/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts +++ b/samples/angular/MusicStore/wwwroot/ng-app/components/public/home/home.ts @@ -12,11 +12,7 @@ export class Home { public mostPopular: models.Album[]; constructor(http: Http) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/albums/mostPopular', options).subscribe(result => { + http.get('/api/albums/mostPopular').subscribe(result => { this.mostPopular = result.json(); }); } diff --git a/templates/Angular2Spa/ClientApp/components/fetch-data/fetch-data.ts b/templates/Angular2Spa/ClientApp/components/fetch-data/fetch-data.ts index 0060f88..96f8fc4 100644 --- a/templates/Angular2Spa/ClientApp/components/fetch-data/fetch-data.ts +++ b/templates/Angular2Spa/ClientApp/components/fetch-data/fetch-data.ts @@ -9,11 +9,7 @@ export class FetchData { public forecasts: WeatherForecast[]; constructor(http: Http) { - // Workaround for RC1 bug. This can be removed with ASP.NET Core 1.0 RC2. - let isServerSide = typeof window === 'undefined'; - let options: any = isServerSide ? { headers: { Connection: 'keep-alive' } } : null; - - http.get('/api/SampleData/WeatherForecasts', options).subscribe(result => { + http.get('/api/SampleData/WeatherForecasts').subscribe(result => { this.forecasts = result.json(); }); }