Skip to content

In mat-form-field mat-error is displayed wrong if added by ngFor #7739

Closed
@ArntB

Description

@ArntB

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Dynamically added mat-error should be rendered the same as statically entered mat-errror.

What is the current behavior?

Now the error message is displayed above the red under line.

What are the steps to reproduce?

to reproduce see: https://material2-select-width-issues-1pb9sd.stackblitz.io
editor url: https://stackblitz.com/edit/material2-select-width-issues-1pb9sd

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

I am trying to build some reusable components for my apps.

In order to standardize the error handling code
I want to be able to write the error messages from an array of error messages.

It will help me make my code DRY.

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

Angular: 4.4.4.
Material 2: 2.0.0-beta.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions