ngModel/formControl for Programatically created components · Issue #34780 · angular/angular · GitHub
Skip to content

ngModel/formControl for Programatically created components #34780

Description

@fkolar

🚀 feature request

Description

Even there is a API (ComponentFactoryResolver, ViewContainerRef ) to create programatically component as of now there is no way to hook in Form API, just like you would use it traditionally.

Right now I am more refering to a Form Input components that needs to be instantiated from the code and even I can connect each and every binding there is no clean way to attach ngModel or formControl.

just like you would this:

<my-input [(ngModel)]="object.name"></my-input>

You shoudl be able to achive the same programatically. In other words add ngModelDirective from code

Are there any plans for this?

Describe the solution you'd like

Ideally it should be treated as any other bindings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions