I want to display selected value in md-select, the value is an Object. not string.
to display the correct option from the select.
not display.
in the plunker should be: "United States" at the begging.
here:
https://plnkr.co/edit/nCJLd5?p=preview
This is not a bug. Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are stack overflow, gitter, mailing list, etc.
As pointed out by @donroyco, this is not a bug. Even though the Object you passed to selectedCountry looks like countries[1], they are different objects so the select wouldn't know which option to display.
In order to select any of the options, you have to select one of the objects you passed to the select, i.e. an Object from the countries list. Here's an updated plunker: https://plnkr.co/edit/GmlISyGT3BSBWxAryEiD?p=preview
You can now pass a compareWith function to MdSelect. See https://material.angular.io/components/select/api
@willshowell YEAH!!! U R D BEST! :)
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._
Most helpful comment
You can now pass a
compareWithfunction to MdSelect. See https://material.angular.io/components/select/api