Here is some code I have that fills in a specific select item on a webpage:
<select ng-model="activity.selectedParent" ng-options="parent as parent.title for parent in parents track by parent._id"></select><br>
I'm curious if there's a way to set a default option where I can give it a Title and an ID. For example, if the default is selected, then
activity.selectedParent.Title = "None"
and activity.selectedParent.id = 0
. Can this be specified within the <select>
tag using Angular directives? If not, what is the most effective approach to achieve this?