3

I'm creating a form where users can enter the person's information. I want to create a dropdown list for phone numbers and fax numbers for the given person, which the user may select the one they desire, i.e. if the numbers that they want is already stored in the database. However, the person may have additional phone number that may not be stored in the database. In that case, I want to allow users to be able to enter the new number. I found one that's close to what I want here, but it's not quite what I wished. I wish to do it using angular-material md-select, if possible.

<md-select ng-model="ctrl.phoneNumbers" ng-model-options="{ trackBy: '$value.id'}">
   <md-option ng-value="phoneNumber" 
              ng-repeat="phoneNumber in ctrl.phoneNumbers">{{ phoneNumber.number }}
   </md-option>
</md-select>
2
  • 1
    How about Angular Material Autocomplete? Commented May 14, 2016 at 3:54
  • That is a nice idea. Thank you. I was only thinking in one way, and didn' think about it at all. Can you add it as an answer so that I can mark it? Commented May 14, 2016 at 3:59

1 Answer 1

7

Angular Material Autocomplete is really close to your case. Help it works.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.