【发布时间】:2018-11-30 16:38:08
【问题描述】:
我正在尝试 angularjs 自动完成 Angucomplete Alt 在这里我复制了相同的代码并在 mylocal 主机上运行,但这没有显示任何结果
我正在搜索术语 ssss 它显示错误
GET https://api.github.com/search/repositoriessafa 404 (Not Found)
我的代码是
var myApp = angular.module('myApp', ["angucomplete-alt"]);
myApp.controller('TestController', function ($scope, $http) {
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.9/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angucomplete-alt/3.0.0/angucomplete-alt.min.js"></script>
<body ng-app="myApp" ng-controller="TestController">
<div angucomplete-alt
id="ex5"
placeholder="Search projects"
pause="500"
selected-object="selectedProject"
remote-url="https://api.github.com/search/repositories"
remote-url-request-formatter="remoteUrlRequestFn"
remote-url-data-field="items"
title-field="name"
description-field="description"
minlength="2"
input-class="form-control form-control-small"
match-class="highlight">
</div>
</body>
有什么遗漏吗?
【问题讨论】:
标签: javascript angularjs