Skip to content

Commit e91dae1

Browse files
committed
Added config for router module.
1 parent dcfdcf9 commit e91dae1

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

src/app/app-routing.module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { RouterModule, Routes } from '@angular/router';
1+
import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
22
import { NgModule } from '@angular/core';
33
import { DashboardPageComponent } from './pages/dashboard/containers';
44
import { NotFoundComponent } from './pages/not-found/not-found.component';
@@ -50,7 +50,10 @@ const routes: Routes = [
5050

5151
@NgModule({
5252
imports: [
53-
RouterModule.forRoot(routes)
53+
RouterModule.forRoot(routes, {
54+
useHash: true,
55+
preloadingStrategy: PreloadAllModules
56+
})
5457
],
5558
exports: [RouterModule]
5659
})

src/app/app.module.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ import { AuthModule } from './pages/auth/auth.module';
1818
AppComponent,
1919
NotFoundComponent
2020
],
21-
imports: [
22-
BrowserModule,
23-
SharedModule,
24-
AuthModule,
25-
DashboardModule,
26-
BrowserAnimationsModule,
27-
RouterModule,
28-
AppRoutingModule,
29-
ToastrModule.forRoot(),
30-
MatCardModule,
31-
MatButtonModule,
32-
],
21+
imports: [
22+
BrowserModule,
23+
SharedModule,
24+
AuthModule,
25+
DashboardModule,
26+
BrowserAnimationsModule,
27+
RouterModule,
28+
AppRoutingModule,
29+
ToastrModule.forRoot(),
30+
MatCardModule,
31+
MatButtonModule,
32+
],
3333
providers: [],
3434
bootstrap: [AppComponent]
3535
})

src/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<title>AngularMaterialAdmin</title>
5+
<title>Angular Material Admin - Free Angular Material Template with tens of components.</title>
66
<base href="/">
7-
<meta name="title" content="Angular Material Admin - Free Angular Material Template with tens of components.">
87
<meta name="description" content="Free and Open-Source admin template built with Angular based on Material Design.">
98
<meta name="keywords" content="angular material admin, angular material dashboard, angular material, material template, angular template.">
109
<meta name="author" content="Flatlogic LLC">

0 commit comments

Comments
 (0)