Skip to content

Mat-option class is not added to the mat-option element #14310

@milone97

Description

@milone97

Bug, feature request, or proposal:

mat-form-field
mat-select placeholder="Not Working"
mat-option class="food-{{ food.value }}" *ngFor="let food of foods" [value]="food.value"
{{food.viewValue}}
mat-option
mat-select
mat-form-field

What is the expected behavior?

La classe "mat-option" viene aggiunta all'elemento "mat-option".

What is the current behavior?

If I add a class to the dynamically composed "mat-option" element, the "mat-option" class is not added to the element.

What are the steps to reproduce?

angular-material2-issue.zip

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

Angular: v6
Material: v6.4.7
Google Chrome: V70.0.3538.102 64 bit

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