4

When we use angular routing,can another component be loaded in the main HTML page instead of root-app component according to the given route?

2 Answers 2

3

add <router-outlet></router-outlet>element on your root-app. i think it will works.

Sign up to request clarification or add additional context in comments.

Comments

3

You can change default page from index.html to different page in angular.json. You could also change the selector in index.html from root-app to any other component. You can also use a router outlet

1 Comment

Give practical working code to do all those things, instead of you can do this or that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.