尝试在Angular 2应用程序中导入npm模块(咆哮) [英] Trying to import an npm module (Howler) in Angular 2 app

查看:274
本文介绍了尝试在Angular 2应用程序中导入npm模块(咆哮)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的angular 2应用程序中导入Howler,但它没有打字文件.我很困惑,一直在寻找答案,但找不到任何东西.如何在没有类型文件的情况下将咆哮"导入我的组件中?

I am trying to import Howler inside my angular 2 app, but it does not have a typings file. I am confused and have been searching for the answer, but cannot find anything. How do I go about importing "howler" inside my component without a typings file?

推荐答案

尝试 DefinitelyTyped 咆哮的类型定义

这是GitHub上的 repo ,您可以在其中找到 howler.d.ts

Here is the repo on GitHub where you can find howler.d.ts

这是npm 软件包信息

TypeScript v2使用以下命令进行安装

TypeScript v2 use following command to install

npm install --save @types/howler

如果有任何疑问,请在其聊天聊天

If you have any question, post in their Gitter chat

这篇关于尝试在Angular 2应用程序中导入npm模块(咆哮)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆