Fixed a bug and increased compatibility

This commit is contained in:
Isaac Grynsztein
2018-01-20 19:33:27 -05:00
parent 2a80ea92cc
commit 43399be0e5
5 changed files with 13 additions and 10 deletions

View File

@@ -35,6 +35,9 @@ export class AppComponent {
this.postsService.path = backendUrl;
this.postsService.startPath = backendUrl;
this.postsService.startPathSSL = backendUrl;
},
error => {
console.log(error);
});
}

View File

@@ -9,6 +9,7 @@ import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
import { PostsService } from 'app/posts.services';
import {APP_BASE_HREF} from '@angular/common';
@NgModule({
declarations: [

View File

@@ -66,11 +66,9 @@ export class PostsService {
}
loadNavItems() {
return this.http.get("../../backend/config/default.json")
console.log("Config location: " + window.location.href + "backend/config/default.json");
return this.http.get(window.location.href + "backend/config/default.json")
.map(res => res.json());
//This is optional, you can remove the last line
// if you don't want to log loaded json in
// console.
}
}