pd *_*had 6 jquery-ui angular-cli angular
我正在为angular2项目使用angular-cli.在我的项目中,我想使用jquery-ui.我安装了jquery-ui
npm install jquery jquery-ui
Run Code Online (Sandbox Code Playgroud)
我编辑了我的angular-cli-build.js
module.exports = function(defaults) {
return new Angular2App(defaults, {
vendorNpmFiles: [
'jquery/src/jquery.js',
'jquery-ui/jquery-ui.js'
]
});
};
Run Code Online (Sandbox Code Playgroud)
它将如何在我的dist/vendor文件夹中自动更新,我是否需要在我的index.html中添加css文件(如css/jquery-ui.css)?
我已经跟随了这个链接的时刻.js 但它没有帮助jquery-ui.我将欣赏jquery-ui与angular-cli集成的一个工作示例
在你的 angular-cli-build.js 中输入:
'jquery/dist/jquery.min.js',
jquery-ui/jquery-ui.min.js', </i>
Run Code Online (Sandbox Code Playgroud)
然后在你的 system.config.ts 中:
const map: any = {
'jquery': 'vendor/jquery/dist/jquery.min.js',
'jquery.ui': 'vendor/jquery-ui/jquery-ui.min.js',
Run Code Online (Sandbox Code Playgroud)
希望有帮助
| 归档时间: |
|
| 查看次数: |
2913 次 |
| 最近记录: |