Closed
Description
openedon Mar 24, 2017
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];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels