ng2-component-injector
Simple injector for angular 2 components. You just have to provide : container, component class, inputs and ouputs. See example/ if needed.
Install
npm install ng2-component-injector --save
Documentation
Ng2ComponentInjectorService
createconfig: Ng2ComponentInjectorConfig, index?: number: ComponentRef<any>
Create and inject an angular 2 component.
Ng2ComponentInjectorConfig
container: ViewContainerRef
The container where you want to inject your component. Example: contentContainerRef
contentContainerRef: ViewContainerRef;
component: any
The component to inject. Example: MyComponent
inputs: any (optional)
The list of inputs to bind. Example:
outputs: any (optional)
The list of outputs to bind. Example:
Ng2ComponentInjectorComponent
Inject an angular 2 component. The config is the same as Ng2ComponentInjectorConfig
except that you don't need to provide a container.