Angular不能识别js对象
发布日期:2021-06-29 19:40:29 浏览次数:2 分类:技术文章

本文共 593 字,大约阅读时间需要 1 分钟。

错误信息:

ERROR in src/app/app.component.ts(34,8): error TS2304: Cannot find name 'WOW'.

解决办法:

declare var WOW: any;

参考文件:

/**

 *  版权所有(C)2018,西安大华时代网络科技有限公司。保留所有权利。
 */
import { Component, OnInit } from '@angular/core';

//import * as $ from 'jquery';

declare var $:any;

declare var WOW: any;

/**

 *     应用组件
 *
 *    @author 刘宏强
 */
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {

  /**

   *    构造函数
   */
  constructor() {
  }

  /**

   *    初始化方法
   */
  ngOnInit() {
  
      // Initiate the wowjs animation library
      new WOW().init();
      
  }

}

 

 

转载地址:https://daqiang.blog.csdn.net/article/details/85553987 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:大华模板库(第一弹)
下一篇:Angular引入第三方JS插件

发表评论

最新留言

网站不错 人气很旺了 加油
[***.192.178.218]2024年05月01日 20时56分51秒