Hi,

I am not sure to fully understand the problem but if it is a route matching 
problem it could be due to the first-match wins strategy of the router. You 
could try to invert the imports.
The option enableTracing of the Router could help you to debug.
RouterModule <https://angular.io/api/router/RouterModule>.forRoot( appRoutes
, { enableTracing: true } 
) 

Regards,
Arnaud.

Le samedi 24 février 2018 13:18:42 UTC+1, [email protected] a écrit :
>
> Hello,
> I've encountered a weird behaviour and don't see the problem. I want to 
> route to two custom components, one of them an 404.component.ts.
> I import in
>
> app.module.ts:
>
> import { Error404Component } from './errors/404.component'
> import { TestComponent } from './events/test.component'
> declarations: [
> Error404Component,
> TestComponent
> ],
>
> route.ts
> import { Error404Component } from './errors/404.component'
> import { TestComponent } from './events/test.component'
>
> When Shift+Click on the import names i get to the correct component. So 
> the path is correct.
> When enter localhost:8088/test I always get "404 error /test" by Angular 
> CLI. Others work. What can this be or how can I debug this?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to