Skip to content

mat-select not pre selecting a value using ngModel #7771

@Lakston

Description

@Lakston

Bug, feature request, or proposal:

Bug

What is the expected behavior?

When the ngModel of a mat-select is populated on page load the mat-select should have that option selected.

What is the current behavior?

mat-select is always showing the placeholder, I've tried using basic primitive values (numbers for the options and ngModel initialised with one of the numbers on page load) and the select is never reflecting the selected option.

What are the steps to reproduce?

mat-select issue

I also added an example with a regular select and option to show that the code is working when not using material, hopefully that helps.

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

material beta 12
angular 4.3.2

Is there anything else we should know?

Please update the plunkr examples with a working version

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