【发布时间】:2017-03-29 09:25:13
【问题描述】:
我正在尝试使用 Web Midi API 构建一个 Angular2 项目。
运行ng build时,由于抛出某些错误,我无法完成该过程,具体是:
这来自这部分代码:
if (navigator.requestMIDIAccess) {
this.browserMidiCompatible = true;
navigator.requestMIDIAccess({ sysex: false })
.then(this.onMIDISuccess.bind(this), this.onMIDIReject.bind(this));
} else {
alert("Platform not compatible");
}
运行ng serve时,该应用在Chrome上运行良好。有没有办法让Angular2在构建时忽略错误?
【问题讨论】:
标签: angular