angular 4使用jquery 第三方插件库
生活随笔
收集整理的这篇文章主要介绍了
angular 4使用jquery 第三方插件库
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
用jBox插件为例子1,npm install jBox --save2,找到.angular-cli.json 增加"../node_modules/jbox/Source/jBox.min.js"3,找到style.scss 增加@import "../node_modules/jbox/Source/jBox.css";4,在组件中写入declare var $: any;$jBox: any;clickAler…
用jBox插件为例子
1,npm install jBox --save
2,找到.angular-cli.json 增加
"../node_modules/jbox/Source/jBox.min.js"3,找到style.scss 增加
@import "../node_modules/jbox/Source/jBox.css";
4,在组件中写入
declare var $: any;
$jBox: any; clickAlert() {
this.myModal = this.$jBox.jBox('Tooltip', { attach: '.tooltip', trigger: 'click' }); this.myModal.open(); } ngAfterViewInit() { this.$jBox = $(this.el.nativeElement); }
ok jBox插件就能在 angular 4 中使用了
转载于:https://www.cnblogs.com/branton-design/p/7885844.html
总结
以上是生活随笔为你收集整理的angular 4使用jquery 第三方插件库的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 广告行业中常说的 CPC,CPM,CPD
- 下一篇: 【bzoj5082】弗拉格 矩阵乘法