Skip to content
Snippets Groups Projects
Commit bf137149 authored by mathias.chouet's avatar mathias.chouet
Browse files

Routeur: les URL inconnues redirigent vers /list proprement

parent ad63ba04
No related branches found
No related tags found
1 merge request!32Resolve "Simplification du code (compatibilité jalhyd)"
...@@ -59,7 +59,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer { ...@@ -59,7 +59,6 @@ export class AppComponent implements OnInit, OnDestroy, Observer {
private appRef: ApplicationRef, private appRef: ApplicationRef,
private errorService: ErrorService, private errorService: ErrorService,
private router: Router, private router: Router,
private route: ActivatedRoute,
private formulaireService: FormulaireService, private formulaireService: FormulaireService,
private httpService: HttpService private httpService: HttpService
) { ) {
......
...@@ -4,7 +4,6 @@ import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core"; ...@@ -4,7 +4,6 @@ import { NgModule, NO_ERRORS_SCHEMA } from "@angular/core";
import { MDBBootstrapModule } from "angular-bootstrap-md"; import { MDBBootstrapModule } from "angular-bootstrap-md";
import { HttpClientModule } from "@angular/common/http"; import { HttpClientModule } from "@angular/common/http";
import { FormsModule } from "@angular/forms"; // <-- NgModel lives here import { FormsModule } from "@angular/forms"; // <-- NgModel lives here
// import { MdInputModule, MdDialogModule } from '@angular/material';
import { ChartModule } from "angular2-chartjs"; import { ChartModule } from "angular2-chartjs";
import { RouterModule, Routes } from "@angular/router"; import { RouterModule, Routes } from "@angular/router";
import { NgxMdModule } from "ngx-md"; import { NgxMdModule } from "ngx-md";
...@@ -56,7 +55,7 @@ const appRoutes: Routes = [ ...@@ -56,7 +55,7 @@ const appRoutes: Routes = [
{ path: "list", component: CalculatorListComponent }, { path: "list", component: CalculatorListComponent },
{ path: "calculator/:uid", component: GenericCalculatorComponent }, { path: "calculator/:uid", component: GenericCalculatorComponent },
{ path: "setup", component: ApplicationSetupComponent }, { path: "setup", component: ApplicationSetupComponent },
{ path: "**", component: CalculatorListComponent } { path: "**", redirectTo: "list", pathMatch: "full" }
]; ];
@NgModule({ @NgModule({
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment