Hi,
I would need to filter out the null and blank options from select options.
Could some one help me on this?
I have the below JSON file,
[
{
"place": "",
"name": "xyz"
},
{
"place": "",
"name": "abc"
},
{
"place": null,
"name": "xyzabc"
},
{
"place": "Some place",
"name": "xyzabc"
}
]
*In HTML template*
<md-select placeholder="Place" [(ngModel)]="selectedPlace"
[ngModelOptions]="{standalone: true}">
<md-option *ngFor="let pl of places" [value]="pl.place">
{{ pl.place }}
</md-option>
</md-select>
**
*I would need to filter the place options. In my example JSON, only "Some
place" should get displayed as an option in select tag.*
--
*Saju Thankathurai*
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.