Skip to content

Commit

Permalink
Routing updates
Browse files Browse the repository at this point in the history
  • Loading branch information
johc committed Mar 28, 2024
1 parent b06da57 commit 3c61079
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
8 changes: 5 additions & 3 deletions fmd-telemetry/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DataComponent } from './pages/data/data.component';
import { StatsComponent } from './pages/stats/stats.component';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';

export const routes: Routes = [
{ path: 'data', component: DataComponent},
{ path: 'stats', component: StatsComponent},
{ path: 'data', component: DataComponent },
{ path: 'stats', component: StatsComponent },
{ path: '', redirectTo: '/stats', pathMatch: 'full' }
];

@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
exports: [RouterModule],
providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}]
})
export class AppRoutingModule { }
10 changes: 0 additions & 10 deletions fmd-telemetry/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script>
(function() {
if (window.location.hostname.includes('github.io')) {
var path = window.location.pathname.substring(1);
if (path && path !== 'fmd-telemetry/') {
window.location.replace('/fmd-telemetry/#/' + path);
}
}
})();
</script>
</head>
<body class="mat-typography">
<app-root></app-root>
Expand Down

0 comments on commit 3c61079

Please sign in to comment.