我正在使用meanjs堆栈构建项目。我想使用一个我发现的角度库,使我的选择器看起来像bootstrap为我们提供的那些。
https://github.com/joaoneto/angular-bootstrap-select(这是图书馆)
我在bower.json中添加了它,并且它已正确安装在我的public / lib文件夹中。之后,我将它与bootstrap-select.js一起包含在我的配置中。
/rootFolder/config/env/all.js:
'use strict';
module.exports = {
app: {
title: 'MyProject',
description: 'my project description',
keywords: 'MongoDB, Express, AngularJS, Node.js'
},
port: process.env.PORT || 3000,
templateEngine: 'swig',
sessionSecret: 'MEAN',
sessionCollection: 'sessions',
assets: {
lib: {
css: [
'public/lib/bootstrap/dist/css/bootstrap.css',
'public/lib/bootstrap/dist/css/bootstrap-theme.css',
],
js: [
'public/lib/angular/angular.js',
'public/lib/angular-resource/angular-resource.js',
'public/lib/angular-cookies/angular-cookies.js',
'public/lib/angular-animate/angular-animate.js',
'public/lib/angular-touch/angular-touch.js',
'public/lib/angular-sanitize/angular-sanitize.js',
'public/lib/angular-ui-router/release/angular-ui-router.js',
'public/lib/angular-ui-utils/ui-utils.js',
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js',
'public/lib/bootstrap-select/bootstrap-select.js',
'public/lib/angular-bootstrap-select/build/angular-bootstrap-select.js'
]
},
css: [
'public/modules/**/css/*.css',
'public/dist/css/*.css'
],
js: [
'public/config.js',
'public/application.js',
'public/modules/*/*.js',
'public/modules/*/*[!tests]*/*.js'
],
tests: [
'public/lib/angular-mocks/angular-mocks.js',
'public/modules/*/tests/*.js'
]
}
};
我收到以下错误: 未捕获的TypeError:无法读取未定义的属性'expr'
我进入了lib里面,我收到了错误:
$.expr[':'].icontains = function(obj, index, meta) {
return $(obj).text().toUpperCase().indexOf(meta[3].toUpperCase()) >= 0;
};
任何帮助都将非常感谢谢谢!