Skip to content

Commit 0e9c88f

Browse files
committed
added hash
1 parent 5d003d1 commit 0e9c88f

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lbd-free-angular-cli",
3-
"version": "1.4.0",
3+
"version": "1.5.1",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",
@@ -23,19 +23,18 @@
2323
"@angular/router": "7.2.12",
2424
"@ngui/map": "0.30.3",
2525
"@types/googlemaps": "3.30.19",
26-
"animate.css": "^3.7.0",
26+
"animate.css": "3.7.0",
2727
"arrive": "2.4.1",
2828
"bootstrap": "3.3.7",
2929
"bootstrap-notify": "3.1.3",
3030
"chartist": "0.11.0",
31-
"core-js": "3.0.1",
31+
"core-js": "2.6.9",
3232
"googleapis": "33.0.0",
33-
"jquery": "3.3.1",
33+
"jquery": "3.4.1",
3434
"perfect-scrollbar": "1.4.0",
3535
"rxjs": "6.4.0",
3636
"rxjs-compat": "6.4.0",
37-
"zone.js": "0.9.0",
38-
"webpack": "4.29.6"
37+
"zone.js": "0.9.0"
3938
},
4039
"devDependencies": {
4140
"@angular-devkit/build-angular": "0.13.8",

src/app/app.routing.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ const routes: Routes =[
2828
imports: [
2929
CommonModule,
3030
BrowserModule,
31-
RouterModule.forRoot(routes)
31+
RouterModule.forRoot(routes,{
32+
useHash: true
33+
})
3234
],
3335
exports: [
3436
],

src/app/shared/navbar/navbar.component.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,10 @@ export class NavbarComponent implements OnInit{
5252

5353
getTitle(){
5454
var titlee = this.location.prepareExternalUrl(this.location.path());
55-
titlee = titlee.split('/').pop();
55+
if(titlee.charAt(0) === '#'){
56+
titlee = titlee.slice( 1 );
57+
}
58+
5659
for(var item = 0; item < this.listTitles.length; item++){
5760
if(this.listTitles[item].path === titlee){
5861
return this.listTitles[item].title;

0 commit comments

Comments
 (0)