gpt4 book ai didi

angular - 使用带有 Angular 6 的 tone.js

转载 作者:太空狗 更新时间:2023-10-29 18:37:52 27 4
gpt4 key购买 nike

我正在尝试在 Angular 6 中导入 tone.js。如 tone.js 安装中所述 doc ,我安装了 tone.js。

npm - npm install tone

我尝试在 app.module.ts 中导入 Tone

import { ToneJs } from 'tone';
imports: [
ToneJs,
...
]

我遇到了这个异常:

Error: Unexpected value 'undefined' imported by the module 'AppModule'

我如何导入和使用带 Angular tone.js?

这是我的 Angular 版本

ng -v
Angular CLI: 6.0.1
Node: 8.11.1
OS: darwin x64
Angular: 6.0.1

编辑:

当我尝试在组件中加载它时

import { Component } from '@angular/core';
import { ToneJs } from 'tone';
@Component({
selector: 'app-player',
templateUrl: './player.component.html',
styleUrls: ['./player.component.css']
})
export class PlayerComponent {
constructor(private toneJs: toneJs) { }
}

我得到:

Error: Can't resolve all parameters for PlayerComponent: (?).

最佳答案

有人叫 Dylan Lawrence已创建 a nice starter我今天早上在谷歌上搜索这个话题时发现了。 super 有帮助!

关于angular - 使用带有 Angular 6 的 tone.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50710954/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com