【发布时间】:2015-10-22 01:50:40
【问题描述】:
我正在尝试在嵌套对象数组上使用 Angular Bootstrap Typeahead,但我不知道如何写出预先输入。
我的数组中的对象是这样的:
{
"category": "Locations",
"regions": [
{
"name": "Northeast",
"category": "region",
"states": [
{
"name": "New York",
"category": "state"
"cities": [
{
"name": "Syracuse",
"category": "city"
}
]
}
]
}
我只想返回名称值。那么我将如何写出来呢?
我目前正在写<input ... typeahead=" filter.name for filter in filters| filter:$viewValue | limitTo:5">
【问题讨论】:
标签: angularjs angular-ui-bootstrap angular-ui-typeahead