Remove Angular 2 Music Store workarounds for an fx bug that was fixed in RC2

This commit is contained in:
SteveSandersonMS
2016-04-21 12:26:18 +01:00
parent 13beb7cf27
commit c073248981
9 changed files with 12 additions and 48 deletions

View File

@@ -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();
});
}