0

I have recently implemented angular2 cli on one of my site, because of angular2 upgrade.

I want to know how I can create different component per page without using route? Is it even possible?

right now its one big angular2 main bundle. kind of confused on how to decouple it.

2 Answers 2

0

If I understood you correctly, I think is possible. You can use ngIf

I create a simple demo on plnkr.

I hope it helps

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

1 Comment

No, I mean how to add different component at run time for different pages, without adding to main bundle js file
0

@Kosmonaft You did not use the routing mechanism, this is very simple switching.

Comments

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.