Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

dynamic component angular parameters

 const factory = this.componentFactoryResolver.resolveComponentFactory(LoginComponent);
    const component: ComponentRef<LoginComponent> = this.viewContainerRef.createComponent(factory);
    component.instance.user = "prop 1";
    component.instance.input2 = "prop 2";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #dynamic #component #angular #parameters
ADD COMMENT
Topic
Name
3+1 =