1
我试图添加自定义jqueryUI datepicker组件到angular4项目。目前我用普通的jquery,html和css开发。我想将该组件添加到angular4。 我已经尝试过,但在运行npm时会出现错误。jQueryUI与angular4
我的jQuery UI的日期选择器(定制rangepicker)
这是我如何导入jQueryUI的,以angular4
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css",
"../node_modules/jquery-ui/../themes/base/all.css",
"../node_modules/bootstrap/dist/css/bootstrap.min.css"
],
"scripts": ["../node_modules/jquery/dist/jquery.min.js",
"../node_modules/jqueryui/jquery-ui.js",
"../node_modules/bootstrap/dist/js/bootstrap.min.js"],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
这是我得到的错误命令提示符
它工作了jquiery.min.js但在同样的方式jquery.min.css犯规进口。它给出同样的错误。有没有什么不同的方式来导入CSS? – Lahi2010
我已经更新了答案并尝试给出css的完整路径。 – 2017-08-05 04:12:58