<input type="text"
class="topic_select"
id="selectTopic"
ng-model="topicsPopulate"
uib-typeahead="topic.name for topic in topics|filter:$viewValue"
uib-typeahead-show-hint="true"
uib-typeahead-min-length="1"
typeahead-on-select="TopicChanged(topicsPopulate)" />
我实际上想发送我选择的主题(一个带有许多变量的 json 对象),而不是存储在topicsPopulate
. Topics 是一个主题数组,一个主题看起来像这样,
{
id: "12967",
name: "ABCD",
description: "ABCD"
}