The New Way to Build! Introducing ReUI — the developer platform for agentic UI with shadcn/ui
Learn More

When pointing to / no template is applied

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 };

and here's the app-routing.ts

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 {}

How can I spot the problem? Thanks

Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


hi i want to use this in my painting related business here is url aryanapainters.ca



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 happy All the best with your project.


Your Support Matters!

We will highly appreciate your Metronic Review on Themeforest.
Please go to Themeforest Downloads page, select Metronic & leave your feedback.
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(