Make base-href dynamic
This commit is contained in:
parent
baa928a10d
commit
0fd7817ff5
@ -1,6 +1,7 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { APP_BASE_HREF } from '@angular/common';
|
||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
@ -30,11 +31,17 @@ import { SharedModule } from './shared/shared.module';
|
||||
RouterModule.forRoot(ROUTES)
|
||||
],
|
||||
|
||||
providers: [{
|
||||
providers: [
|
||||
{
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: ApiInterceptor,
|
||||
multi: true
|
||||
}],
|
||||
},
|
||||
{
|
||||
provide: APP_BASE_HREF,
|
||||
useValue: window['base-href']
|
||||
}
|
||||
],
|
||||
|
||||
declarations: [
|
||||
AppComponent,
|
||||
|
@ -1,10 +1,6 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>TaskBoard - Kanban App</title>
|
||||
<base href="">
|
||||
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta http-equiv="cleartype" content="on">
|
||||
@ -23,6 +19,12 @@
|
||||
<meta name="msapplication-TileColor" content="#e6e6e6">
|
||||
<meta name="msapplication-config" content="favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
||||
<title>TaskBoard - Kanban App</title>
|
||||
|
||||
<script>
|
||||
window['base-href'] = window.location.pathname;
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<tb-app-component>
|
||||
|
Reference in New Issue
Block a user