Merge base-path to dev
This commit is contained in:
commit
cce6e23aee
@ -1,6 +1,7 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
|
import { APP_BASE_HREF } from '@angular/common';
|
||||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||||
import { RouterModule } from '@angular/router';
|
import { RouterModule } from '@angular/router';
|
||||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||||
@ -16,6 +17,16 @@ import { DashboardModule } from './dashboard/dashboard.module';
|
|||||||
import { SettingsModule } from './settings/settings.module';
|
import { SettingsModule } from './settings/settings.module';
|
||||||
import { SharedModule } from './shared/shared.module';
|
import { SharedModule } from './shared/shared.module';
|
||||||
|
|
||||||
|
function getBasePath() {
|
||||||
|
let path = window.location.pathname;
|
||||||
|
|
||||||
|
['/boards', '/settings', '/dashboard'].forEach(p => {
|
||||||
|
path = path.replace(p, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
@ -30,11 +41,17 @@ import { SharedModule } from './shared/shared.module';
|
|||||||
RouterModule.forRoot(ROUTES)
|
RouterModule.forRoot(ROUTES)
|
||||||
],
|
],
|
||||||
|
|
||||||
providers: [{
|
providers: [
|
||||||
|
{
|
||||||
provide: HTTP_INTERCEPTORS,
|
provide: HTTP_INTERCEPTORS,
|
||||||
useClass: ApiInterceptor,
|
useClass: ApiInterceptor,
|
||||||
multi: true
|
multi: true
|
||||||
}],
|
},
|
||||||
|
{
|
||||||
|
provide: APP_BASE_HREF,
|
||||||
|
useFactory: getBasePath
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>TaskBoard - Kanban App</title>
|
|
||||||
<base href="/TaskBoard/dist/">
|
|
||||||
|
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
<meta http-equiv="cleartype" content="on">
|
<meta http-equiv="cleartype" content="on">
|
||||||
@ -23,6 +19,8 @@
|
|||||||
<meta name="msapplication-TileColor" content="#e6e6e6">
|
<meta name="msapplication-TileColor" content="#e6e6e6">
|
||||||
<meta name="msapplication-config" content="favicons/browserconfig.xml">
|
<meta name="msapplication-config" content="favicons/browserconfig.xml">
|
||||||
<meta name="theme-color" content="#ffffff">
|
<meta name="theme-color" content="#ffffff">
|
||||||
|
|
||||||
|
<title>TaskBoard - Kanban App</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<tb-app-component>
|
<tb-app-component>
|
||||||
|
Reference in New Issue
Block a user