components icon indicating copy to clipboard operation
components copied to clipboard

md-select doesnt work unless it has ng directive in it

Open Anoop-Goudar opened this issue 9 years ago • 6 comments

Bug, feature request, or proposal:

<md-select placeholder="Message Type" [(ngModel)]="messageType" (ngModelChange)="getMessagesOfType(messageType)"> <md-option [value]="Text"> Text <md-option [value]="Media"> Media This is not working unless I put *ngIf="true" directive inside md-select

What is the expected behavior?

It should have worked without any dependency over *ngIf directive

What is the current behavior?

Working only after I put *ngIf directive

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

@angular/cli": "^1.5.0, @angular/material": "^2.0.0-beta.6,angular2-materialize": "^15.0.1, Ubuntu, typescript": "^2.6.1, Chrome

Anoop-Goudar avatar Nov 13 '17 06:11 Anoop-Goudar

Can you post an example of the issue? You can use this Plunkr as a base.

crisbeto avatar Nov 13 '17 13:11 crisbeto

can you please give me access to that plunk ? Another thing I noticed it md-options expects values to be given in array using *ngFor , else options wont get selected. There is some connectivity with *ng directives for me to make md-select work properly.

Anoop-Goudar avatar Nov 13 '17 14:11 Anoop-Goudar

You can press the "Fork" button to create a copy of the Plunk.

crisbeto avatar Nov 13 '17 14:11 crisbeto

Thanks for assisting me with that, I am new to plunker .

I am using MdSelectModule not MatSelectModule. And was not able to import in the base plunk you sent

Anoop-Goudar avatar Nov 13 '17 15:11 Anoop-Goudar

Closing this since it's referring to beta.6 which is now about 6 months old. Feel free to open a new issue if you're still able to reproduce with the latest version.

jelbourn avatar Nov 14 '17 03:11 jelbourn

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.