我想在导航栏中显示结果。

的HTML

<input type="text" ng-model="result" min-length="2" typeahead="institution.id as institution.name for institution in institutions($viewValue)" style="display:block" placeholder="Search">

JS
$scope.institutions = function(institution) {
    return $institutions, {
        query: institutions
    }
        .then(function(response) {
            return limitToFilter(response.data, 15);
        });
};

这是我在控制台中遇到的错误。

最佳答案

$scope.institutions = function(institution) {
    return{ $institutions, {
        query: institutions
    }
        .then(function(response) {
            return limitToFilter(response.data, 15);
        });
}
};

10-06 04:41