import {Headers} from "@angular/http"; export class AppConfig { public readonly apiUrl = ''; public readonly apiAwardPath = '/awardings/'; public readonly apiDecorationPath = '/decorations/'; public readonly apiAuthenticationPath = '/authenticate'; public readonly apiRankPath = '/ranks/'; public readonly apiSquadPath = '/squads/'; public readonly apiUserPath = '/users/'; public getAuthenticationHeader() :Headers { let currentUser = JSON.parse(localStorage.getItem('currentUser')); let headers = new Headers(); headers.append('x-access-token', currentUser.token); return headers; } }