1
npm install jquery — save
2
.angular-cli.json
“scripts”: [ “../node_modules/jquery/dist/jquery.min.js” ]
3
app.component.ts
import * as $ from ‘jquery’;
测试
$('body').addClass('aaa');
原文链接:https://www.f2er.com/angularjs/145068.htmlnpm install jquery — save
.angular-cli.json
“scripts”: [ “../node_modules/jquery/dist/jquery.min.js” ]
app.component.ts
import * as $ from ‘jquery’;
$('body').addClass('aaa');
原文链接:https://www.f2er.com/angularjs/145068.html