ANGULAR ROUTES 2+

Asked

Viewed 30 times

1

I’ve separated my route modules: 1 - product.routing.module.ts Where I have the route of /product and its daughters /product/new /product/Edit 2 - app.routing.module.ts Where I have the roots routes of my application /Orders /customers but did not put the route /product

When I put in my app.module.routing.ts { path: ŋ**', Component: Pagenotfoundcomponent }

When I access my route /products appears the Pagenotfoundcomponent

It only works if I put path: >*' ( with an asterisk ) but does not load the daughter routes of /products, which I must do?

HELP ;/

  • Vice must use lazymodule in app.routing.module.ts. it will look like this: export const Approuter: Routes = { path: 'product', loadChildren: './product/product.module#Productsmodule' },

  • So it only works with lazyloading?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.