【发布时间】:2017-07-09 16:33:31
【问题描述】:
我正在尝试将 Bloodhound.js 实施到使用 Angular 2 CLI 的 Angular 2 项目中。目前我有 jQuery 通过以下方法工作:
npm install jquery --save
npm install @types/jquery --save-dev
然后将 '"../node_modules/jquery/dist/jquery.min.js"' 添加到 angular-cli.json 中的脚本数组中。
我对 angular-cli.json 中的 Bloodhound.js 也做了同样的事情:
"../node_modules/bloodhound-js/dist/bloodhound.min.js"
但是我收到以下错误:
找不到名字“猎犬”。
有没有办法直接导入.js文件或者在本地添加导入?
【问题讨论】:
-
你找到解决办法了吗
标签: jquery angular typeahead bloodhound