Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在angular web应用程序中使用外部js文件功能_Angular_External Js - Fatal编程技术网

如何在angular web应用程序中使用外部js文件功能

如何在angular web应用程序中使用外部js文件功能,angular,external-js,Angular,External Js,我只想使用外部js文件在angular web应用程序中构建动画 我在W3C网站上在线发现: 我只想在我的angular应用程序中使用这个js文件,但它不起作用 $('.owl-carousel').owlCarousel({ loop: true, margin: 10, nav: false, autoplay: true, autoplayTimeout: 3000, autoplayHoverPause: true, dots: false, resp

我只想使用外部js文件在angular web应用程序中构建动画

我在W3C网站上在线发现:

我只想在我的angular应用程序中使用这个js文件,但它不起作用

 $('.owl-carousel').owlCarousel({
  loop: true,
  margin: 10,
  nav: false,
  autoplay: true,
  autoplayTimeout: 3000,
  autoplayHoverPause: true,
  dots: false,
  responsive: {
    0: {
      items: 1
    },
    600: {
      items: 3
    },
    1000: {
      items: 5
    }
  }
})
在外部js文件中有这个函数,我如何在我的angular web应用程序中使用这个函数


有人能给我一些建议吗?

正确的方法是将代码转换成Typescript。 您应该一步一步地实现角度逻辑

您可以实现一个指令,并在任何需要的地方调用它。

但我不想更改外部js文件中的任何代码。