use hash for internal routing in the frontend

This commit is contained in:
Baptiste Lemoine 2020-01-22 14:16:03 +01:00
parent f96833d96e
commit b06a44fb98
2 changed files with 6 additions and 5 deletions

View File

@ -1,14 +1,15 @@
{ {
"name": "framadate-funky-frontend", "name": "framadate-funky-frontend",
"version": "1.0.0", "version": "1.0.0",
"licence": "GNU Affero V3", "licence": "AGPL-3.0-or-later",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"serve": "ng serve", "serve": "ng serve",
"build": "ng build --crossOrigin=anonymous --aot=false", "build": "ng build --crossOrigin=anonymous --output-hashing=none --prod && npm run package",
"package": "rm dist/framadate/framadate-scripts-bundled.js && cat dist/framadate/*.js > dist/framadate/framadate-scripts-bundled.js", "package": "cat dist/framadate/*.js > dist/framadate/framadate-scripts-bundled.js && ls -l dist/framadate",
"build:demo": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --progress=true --output-hashing=none --prod && npm run package", "build:demo": "ng build --crossOrigin=anonymous --extractCss=true --progress=true --output-hashing=none --prod && npm run package",
"build:demobliss": "ng build --crossOrigin=anonymous --extractCss=true --baseHref=https://framadate-api.cipherbliss.com --progress=true --output-hashing=none --prod && npm run package",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e", "e2e": "ng e2e",

View File

@ -123,7 +123,7 @@ export function HttpLoaderFactory(http: HttpClient) {
}), }),
HttpClientModule, HttpClientModule,
FormsModule, FormsModule,
RouterModule.forRoot(Routes) RouterModule.forRoot(Routes, {useHash: true})
], ],
providers: [TranslateService, ConfigService, PollService, MessageService, ConfirmationService], providers: [TranslateService, ConfigService, PollService, MessageService, ConfirmationService],
bootstrap: [AppComponent] bootstrap: [AppComponent]