我打算使用 的某个功能angular-datatables
,即:在各个列下方创建过滤器输入字段。一个演示。
此功能仅在dev
软件包版本中可用。
我在我的对象中设置"angular-datatables": "dev"
了版本bower.json
"dependencies"
,并发出:
$ bower install --save
bower not-cached git://github.com/l-lin/angular-datatables.git#dev
bower resolve git://github.com/l-lin/angular-datatables.git#dev
bower checkout angular-datatables#dev
bower resolved git://github.com/l-lin/angular-datatables.git#3c05e6a2f9
bower install angular-datatables#3c05e6a2f9
angular-datatables#3c05e6a2f9 bower_components/angular-datatables
├── angular#1.2.26
├── datatables#1.10.2
└── jquery#2.1.1
bower_components/angular-datatables 的内容最终是这样的。
接下来,我尝试清除浏览器缓存。重复上面的步骤,仍然是的版本angular-datatables
仍然是0.2.0
.
我也尝试过发出bower cache clean
,然后是 a bower install --save
,但徒劳无功。
$ bower info angular-datatables
告诉我以下版本可用:
bower angular-datatables#* cached git://github.com/l-lin/angular-datatables.git#0.2.0
bower angular-datatables#* validate 0.2.0 against git://github.com/l-lin/angular-datatables.git#*
{
name: 'angular-datatables',
version: '0.2.0',
author: 'l-lin',
main: 'dist/angular-datatables.js',
ignore: [
'.bowerrc',
'.editorconfig',
'.git*',
'.jshintrc',
'Gruntfile.js',
'test',
'node_modules',
'src',
'.travis.yml',
'vendor',
'data.json',
'data1.json',
'demo',
'favicon.png',
'index.html',
'README.md',
'server',
'styles',
'_config.yml',
'grunt',
'images',
'package.json'
],
dependencies: {
angular: '>=1.2.6',
jquery: '>=1.11.0',
datatables: '>=1.9.4'
},
devDependencies: {
'angular-mocks': '1.2.6',
bootstrap: '3.0.1',
'angular-bootstrap': '0.10.0'
},
homepage: 'https://github.com/l-lin/angular-datatables'
}
Available versions:
- 0.2.0
- 0.1.1
- 0.1.0
- 0.0.3
- 0.0.2
- 0.0.1
接下来,我恢复到v0.2.0
,然后使用带有#dev
后缀的 install 命令。
$ bower install angular-datatables#dev --save
bower angular-datatables#dev not-cached git://github.com/l-lin/angular- datatables.git#dev
bower angular-datatables#dev resolve git://github.com/l-lin/angular-datatables.git#dev
bower angular-datatables#0.2.0 cached git://github.com/l-lin/angular-datatables.git#0.2.0
bower angular-datatables#0.2.0 validate 0.2.0 against git://github.com/l-lin/angular-datatables.git#0.2.0
bower angular-datatables#dev checkout dev
bower angular-datatables#dev resolved git://github.com/l-lin/angular-datatables.git#83ce3847da
Unable to find a suitable version for angular-datatables, please choose one:
1) angular-datatables#dev which resolved to 83ce3847da
2) angular-datatables#0.2.0 which resolved to 0.2.0 and is required by zap-adm-ang
Prefix the choice with ! to persist it to bower.json
? Answer:: 1
这将我的bower.json
文件更新为"angular-datatables": "dev"
,但是当我angular-datatables.js
在目录中打开文件时bower_components/angular-datatables/dist/
,版本仍然是0.2.0
. 问题仍然存在。
这是我与angular-datatables
包维护者对这个问题的讨论(以防我错过了一些细节)。