2
私のアプリケーションにintro.jsを統合したいと思います。インテグレーションの結果が未処理のプロミス拒否
私はintro.jsフレームワーク(2.4.0)と@types(2.0.28)を取得します。 私のコードはビルドされますが、実行されません。
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'my',
template: require('./my.component.html')
})
export class My implements OnInit {
ngOnInit() {
introJs('introduction').start();
}
}
introJSメソッドは、TypeScriptで認識されます。
私はこのエラーがあります:
Unhandled Promise rejection: introJs is not defined ; Zone: angular ; Task: Promise.then ; Value: ReferenceError: introJs is not defined(…) ReferenceError: introJs is not defined
あなたが任意のアイデアを持っていますか?
「IntroJS」の入力を参照する必要があります –
ライブラリをインポートしていますか? – Bazinga
はい、@ type/intro.jsをインストールし、ライブラリintro.jsをインポートします。私の環境はintroJSメソッドを認識します – di99er