component tags not inside <router-outlet>

406 views
Skip to first unread message

Alexander Mills

unread,
Dec 23, 2020, 1:42:02 AM12/23/20
to Angular and AngularJS discussion
I have this:

Screen Shot 2020-12-22 at 10.40.43 PM.png

but I am seeing this in the HTML:

Screen Shot 2020-12-22 at 10.38.09 PM.png

the fact that <app-signup> and <app-login> are not inside the <router-outlet> tag seems wrong and maybe that's why my routing is misbehaving?


Arnaud Deman

unread,
Dec 23, 2020, 10:11:39 AM12/23/20
to Angular and AngularJS discussion
Hi Alexender,
I would say it's normal: it's similar in Angular's live demo: https://angular.io/generated/live-examples/router/stackblitz.html
Regards,
Arnaud.

Aaron Frost

unread,
Dec 29, 2020, 3:55:33 PM12/29/20
to Angular and AngularJS discussion
That's totally how it works in Angular with the router-outlet. In AngularJS, the view was rendering inside of the ng-view. But in Angular, the rendered component is rendered next to the router-outlet. That is working as expected. 
Reply all
Reply to author
Forward
0 new messages