Skip to content

Commit

Permalink
Remove hash location strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Apr 12, 2022
1 parent d9894a2 commit ab48dda
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions src/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /primeng/
RewriteRule ^primeng/index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /primeng/index.php [L]
</IfModule>
<Files "*.json">
Header set Access-Control-Allow-Origin "*"
</Files>
2 changes: 1 addition & 1 deletion src/app/showcase/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ import { AppMainComponent } from './app.main.component';
{path: 'virtualscroller', loadChildren: () => import('./components/virtualscroller/virtualscrollerdemo.module').then(m => m.VirtualScrollerDemoModule)}
],
},
],{scrollPositionRestoration: 'enabled'})
],{scrollPositionRestoration: 'enabled', useHash: false})
],
exports: [RouterModule]
})
Expand Down
4 changes: 2 additions & 2 deletions src/app/showcase/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
import { LocationStrategy, PathLocationStrategy } from '@angular/common';
import { AppRoutingModule } from './app-routing.module';

import { AppComponent } from './app.component';
Expand Down Expand Up @@ -92,7 +92,7 @@ import { AppMainComponent } from './app.main.component';
DropdownModule
],
providers: [
{ provide: LocationStrategy, useClass: HashLocationStrategy },
{ provide: LocationStrategy, useClass: PathLocationStrategy },
CarService,CountryService,EventService,NodeService,IconService,CustomerService,PhotoService,JsonService,AppConfigService, ProductService
],
bootstrap: [AppComponent]
Expand Down

0 comments on commit ab48dda

Please sign in to comment.