From e576b281984ac7d3a3a951ebccecb88cfaab0af9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Holeczek?= <lukasz@holeczek.pl>
Date: Sat, 8 Oct 2016 19:30:53 +0200
Subject: [PATCH] Change LocationStrategy to HashLocationStrategy

---
 .../src/app/app.module.ts                     | 68 ++++++++++---------
 1 file changed, 37 insertions(+), 31 deletions(-)

diff --git a/Angular2_CLI_Full_Project/src/app/app.module.ts b/Angular2_CLI_Full_Project/src/app/app.module.ts
index 586f1a8..35b6855 100644
--- a/Angular2_CLI_Full_Project/src/app/app.module.ts
+++ b/Angular2_CLI_Full_Project/src/app/app.module.ts
@@ -1,5 +1,7 @@
 import { NgModule }                     from '@angular/core';
 import { BrowserModule }                from '@angular/platform-browser';
+import { LocationStrategy,
+    HashLocationStrategy }         from '@angular/common';
 
 import { AppComponent }                 from './app.component';
 import { Ng2BootstrapModule }           from 'ng2-bootstrap/ng2-bootstrap';
@@ -43,36 +45,40 @@ import { LoginComponent }               from './pages/login.component';
 import { RegisterComponent }            from './pages/register.component';
 
 @NgModule({
-  imports: [
-    BrowserModule,
-    routing,
-    Ng2BootstrapModule,
-    ChartsModule
-  ],
-  declarations: [
-    AppComponent,
-    FullLayoutComponent,
-    SimpleLayoutComponent,
-    DashboardComponent,
-    ButtonsComponent,
-    CardsComponent,
-    FormsComponent,
-    SocialButtonsComponent,
-    SwitchesComponent,
-    TablesComponent,
-    FontAwesomeComponent,
-    SimpleLineIconsComponent,
-    WidgetsComponent,
-    ChartsComponent,
-    p404Component,
-    p500Component,
-    LoginComponent,
-    RegisterComponent,
-    NAV_DROPDOWN_DIRECTIVES,
-    BreadcrumbsComponent,
-    SIDEBAR_TOGGLE_DIRECTIVES,
-    AsideToggleDirective
-  ],
-  bootstrap: [ AppComponent ]
+    imports: [
+        BrowserModule,
+        routing,
+        Ng2BootstrapModule,
+        ChartsModule
+    ],
+    declarations: [
+        AppComponent,
+        FullLayoutComponent,
+        SimpleLayoutComponent,
+        DashboardComponent,
+        ButtonsComponent,
+        CardsComponent,
+        FormsComponent,
+        SocialButtonsComponent,
+        SwitchesComponent,
+        TablesComponent,
+        FontAwesomeComponent,
+        SimpleLineIconsComponent,
+        WidgetsComponent,
+        ChartsComponent,
+        p404Component,
+        p500Component,
+        LoginComponent,
+        RegisterComponent,
+        NAV_DROPDOWN_DIRECTIVES,
+        BreadcrumbsComponent,
+        SIDEBAR_TOGGLE_DIRECTIVES,
+        AsideToggleDirective
+    ],
+    providers: [{
+        provide: LocationStrategy,
+        useClass: HashLocationStrategy
+    }],
+    bootstrap: [ AppComponent ]
 })
 export class AppModule { }
-- 
GitLab