Angular绑定第三方js库事件初始化

时间:2018-04-12 13:15:01

标签: jquery angular

请建议角度解决方案。

我在我的角度应用程序中包含了bootstrap库js文件,现在我想将它的函数绑定到onotoalize上的我的元素,但我无法这样做。它说该功能没有定义。以下是来自bootstrap的事件

ngOnInit() {


$('div').popover({
  html: true,
  trigger: 'hover',
  placement: 'bottom',
  content: function () {
    return $(this).find('.popover-data').html();
  }
});
}}

其给出的错误正在跟随。

ERROR TypeError: $(...).popover is not a function

但是当我从开发人员chrome控制台运行这个jquery代码时,它工作正常,这意味着我的bootstrap js加载了应用程序

0 个答案:

没有答案
相关问题