Closed
Description
Bug caused by #2722
Expected:
This valid template should not cause an error:
<md-select #foo><md-select>
<div *ngIf="foo.selected != null">...</div>
Actual:
Error: "Cannot read property 'selected' of undefined" because in Material's source code, _selectionModel
is undefined
until ngAfterContentInit
:
get selected(): MdOption | MdOption[] {
return this.multiple ? this._selectionModel.selected : this._selectionModel.selected[0];
}
Metadata
Metadata
Assignees
Labels
No labels