Skip to content

allow using md-form-field within dynamic components #6728

Closed
@aitboudad

Description

@aitboudad

Bug, feature request, or proposal:

proposal

What is the expected behavior?

I want to create a wrapper component with md-form-field which render a dynamic component that render and (input, checkbox ...).

    <md-form-field>
      <ng-template #fieldComponent></ng-template> // will render a component with `<input mdInput />` for example
    </md-form-field>

What is the current behavior?

An exception is raised Error: md-form-field must contain a MdFormFieldControl.

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Is there anything else we should know?

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsarea: material/form-fieldfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions