-1

I need to make a contextual menu. but inside the menu i need to load any view that i want. I want to load any component/view and possibly pass some information to it.

is this posible? Thx!

4
  • Checkout how to pass data from component to component Commented Nov 24, 2016 at 14:30
  • Yep that is not the main issue, the main problem is that i need a service that loads components and show that component inside the contextmenu.component Commented Nov 24, 2016 at 14:54
  • <app-sub-component *ngIf="service.shouldLoadSubComponent() | async"></app-sub-component> ? Commented Nov 24, 2016 at 15:00
  • that way you always add the same component inside, i want to load components dynamicly depending of the context you are in the app, (thus the name contextual/context-menu) Commented Nov 24, 2016 at 15:20

1 Answer 1

0

I can't write a comment so I have to post it as an answer. This might help you:

Angular2 RC6 - Dynamically load component from module

Angular 2.2 Dynamically load components using System.import

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

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.