Creates an instance of a Component and attaches it to the View Container
found at the location
specified as ViewContainerRef.
You can optionally provide providers
to configure the Injector
provisioned for this Component Instance.
Returns a promise for the ComponentRef representing the newly created Component.
### Example
```
@Component(
selector: 'child-component',
template: 'Child'
)
class ChildComponent {
}
@Component(
selector: 'my-app',
template: 'Parent'
)
class MyApp {
MyApp(DynamicComponentLoader dcl,
ViewContainerRef viewContainerRef) {
dcl.loadNextToLocation(ChildComponent, viewContainerRef);
}
}
bootstrap(MyApp);
```
Resulting DOM:
```
<my-app>Parent</my-app>
<child-component>Child</child-component>
```
Source
Future<ComponentRef> loadNextToLocation(Type type, ViewContainerRef location, [Injector injector, List<List<dynamic>> projectableNodes]);