diff --git a/src/app/kanban/shared/self-updater.service.ts b/src/app/kanban/shared/self-updater.service.ts index a1f3899..a3bdda0 100644 --- a/src/app/kanban/shared/self-updater.service.ts +++ b/src/app/kanban/shared/self-updater.service.ts @@ -1,6 +1,7 @@ import {Injectable} from '@angular/core'; import {Http} from "@angular/http"; import {Observable} from "rxjs/Observable"; +import {Location} from "@angular/common"; @Injectable() @@ -9,8 +10,10 @@ export class SelfUpdaterService { private appRevision: number = 0; private initFailed: boolean = false; - constructor(private httpService: Http) { - console.log("init"); + constructor( + private httpService: Http, + private locationService: Location, + ) { this.getDeployedRevision().subscribe( result => this.appRevision = result, () => { @@ -24,7 +27,7 @@ export class SelfUpdaterService { } private getDeployedRevision(): Observable { - return this.httpService.get("/revision.json").map(result => result.json()); + return this.httpService.get(this.locationService.prepareExternalUrl("/revision.json")).map(result => result.json()); } public checkAndReloadIfNecessary() {