如何将 "ui.bootstrap" 依赖项添加到现有的 Bower 组件以实现 "typeahead" 功能?
How to add "ui.bootstrap" dependency to existing bower components for achieving "typeahead" feature?
如何向现有的 Bower 组件添加 "ui.bootstrap" 依赖以实现 "typeahead" 功能?
我在异步搜索项目时遵循给定的 link(https://angular-ui.github.io/bootstrap/) 以自动完成建议,它需要 ui.bootstrap 来实现此功能,所以怎么能我将此功能添加到我现有的项目 bower.json 文件
我的bower.json
{
"name": "project-ui",
"version": "0.0.0",
"dependencies": {
"angular": "^1.3.0",
"bootstrap": "^3.2.0",
"angular-animate": "^1.3.0",
"angular-cookies": "^1.3.0",
"angular-resource": "^1.3.0",
"angular-route": "^1.3.0",
"angular-sanitize": "^1.3.0",
"angular-touch": "^1.3.0"
},
"devDependencies": {
"angular-mocks": "^1.3.0"
},
"appPath": "app",
"moduleName": "projectUiApp"
}
根据文档 https://github.com/angular-ui/bootstrap/blob/master/README.md#install-with-bower
运行 此命令将安装 angular-bootstrap 并将其添加到开发依赖项
bower install angular-bootstrap --save-dev
然后根据https://angular-ui.github.io/bootstrap/#/getting_started
As soon as you've got all the files downloaded and included in your page
you just need to declare a dependency on the ui.bootstrap module:
angular.module('myModule', ['ui.bootstrap']);
如何向现有的 Bower 组件添加 "ui.bootstrap" 依赖以实现 "typeahead" 功能?
我在异步搜索项目时遵循给定的 link(https://angular-ui.github.io/bootstrap/) 以自动完成建议,它需要 ui.bootstrap 来实现此功能,所以怎么能我将此功能添加到我现有的项目 bower.json 文件
我的bower.json
{
"name": "project-ui",
"version": "0.0.0",
"dependencies": {
"angular": "^1.3.0",
"bootstrap": "^3.2.0",
"angular-animate": "^1.3.0",
"angular-cookies": "^1.3.0",
"angular-resource": "^1.3.0",
"angular-route": "^1.3.0",
"angular-sanitize": "^1.3.0",
"angular-touch": "^1.3.0"
},
"devDependencies": {
"angular-mocks": "^1.3.0"
},
"appPath": "app",
"moduleName": "projectUiApp"
}
根据文档 https://github.com/angular-ui/bootstrap/blob/master/README.md#install-with-bower
运行 此命令将安装 angular-bootstrap 并将其添加到开发依赖项
bower install angular-bootstrap --save-dev
然后根据https://angular-ui.github.io/bootstrap/#/getting_started
As soon as you've got all the files downloaded and included in your page you just need to declare a dependency on the ui.bootstrap module:
angular.module('myModule', ['ui.bootstrap']);