title: Dynamically load Angular component with dependencies
body: <p>I've been looking for a clean way (without using private API) solution to a widget style dashboard. I want to dynamically load components onto it based on user role.</p>
  <p>Is there a way to import a component and dependencies that are included in components' module dynamically and is such solution production ready?</p>
  <p>Stackblitz reproduction:</p>
  <p><a href="https://stackblitz.com/edit/angular-dynamically-loaded-dashboard?file=src/app/dashboard/dashboard.component.html" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-dynamically-loaded-dashboard?file=src/app/dashboard/dashboard.component.html</a></p>
  <p>Any help towards a clean solution is welcome.</p>
  <p>Edit: I have tried resolving components using ViewContainerRef, while the solution works (component is rendered), it just gets appended to the view, and I want to be able to get the reference of the component with resolved dependencies and pass it into a *ngComponentOutlet so I can use gridster to move and resize component.</p>