Hello,
I've started editing your Angular Demo1 template so that it can feet my needs but I've got a strange problem....
When I just point to / I got the page witout template and I don't understand what's wrong, I've got no error or hints that can help me spotting the problem.
Here's what happens https://i.postimg.cc/JztmD8jZ/s1.png
and what happens if I put /data-owner
https://i.postimg.cc/9X1vGSmp/s2.png
Here's my routing file (/pages/routing.ts)
import { Routes } from "@angular/router";
const Routing: Routes = [
{
path: "data-owner",
loadChildren: () =>
import("../../app/data-owner/data-owner.module").then((m) => m.DataOwnerModule),
},
{
path: "platform-blacklist",
loadChildren: () =>
import("../../app/platform-blacklist/platform-blacklist.module").then((m) => m.PlatformBlacklistModule),
},
{
path: "platform-metadata",
loadChildren: () =>
import("../../app/platform-metadata/platform-metadata.module").then((m) => m.PlatformMetadataModule),
},
{
path: "vocabulary",
loadChildren: () =>
import("../../app/vocabulary/vocabulary.module").then((m) => m.VocabularyModule),
},
{
path: "supplier-source",
loadChildren: () =>
import("../../app/supplier-source/supplier-source.module").then((m) => m.SupplierSourceModule),
},
{
path: "/",
redirectTo: "vocabulary",
pathMatch: "full",
},
{
path: "**",
redirectTo: "error/404",
},
];
export { Routing };
import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";
import { AuthGuard } from "./modules/auth/services/auth.guard";
export const routes: Routes = [
{
path: "auth",
loadChildren: () =>
import("./modules/auth/auth.module").then((m) => m.AuthModule),
},
{
path: "error",
loadChildren: () =>
import("./modules/errors/errors.module").then((m) => m.ErrorsModule),
},
{
path: "",
canActivate: [AuthGuard],
loadChildren: () =>
import("./_metronic/layout/layout.module").then((m) => m.LayoutModule),
},
{ path: "**", redirectTo: "error/404" },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
Hello,
I've fixed it... I was wrongly referencing the Components inside the app.module... removed them and it worked.. you can close
Glad to hear that All the best with your project.