| /******************************************************************************** |
| * Copyright (c) 2020 Contributors to the Eclipse Foundation |
| * |
| * See the NOTICE file(s) distributed with this work for additional |
| * information regarding copyright ownership. |
| * |
| * This program and the accompanying materials are made available under the |
| * terms of the Eclipse Public License 2.0 which is available at |
| * http://www.eclipse.org/legal/epl-2.0 |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| ********************************************************************************/ |
| |
| import {NgModule} from "@angular/core"; |
| import {PreloadAllModules, RouterModule, Routes} from "@angular/router"; |
| |
| export const appRoutes: Routes = [ |
| { |
| path: "", |
| loadChildren: () => import("./features/dashboard") |
| .then((m) => m.DashboardModule) |
| }, |
| { |
| path: "details", |
| loadChildren: () => import("./features/details") |
| .then((m) => m.StatementDetailsModule) |
| }, |
| { |
| path: "new", |
| loadChildren: () => import("./features/new") |
| .then((m) => m.NewStatementModule) |
| }, |
| { |
| path: "edit", |
| loadChildren: () => import("./features/edit") |
| .then((m) => m.StatementEditModule) |
| }, |
| // The wildcard has to be placed as the last item (otherwise, its overriding routes) |
| { |
| path: "**", |
| redirectTo: "" |
| } |
| ]; |
| |
| @NgModule({ |
| imports: [RouterModule.forRoot(appRoutes, {preloadingStrategy: PreloadAllModules})], |
| exports: [RouterModule] |
| }) |
| export class AppRoutingModule { |
| } |