1

現在、 ng-joyrideを動作させようとしていますが、実際には、やりたいことをやりたくないようです....

私は次の設定をしています:

HTML:

<!--some content-->
<div class="hide" ng-joy-ride="$ctrl.startJoyRide" config="$ctrl.config" on-finish="$ctrl.onFinish()"  on-skip="$ctrl.onFinish()"></div>

<button type="button" class="btn btn-default" ng-click="$ctrl.test()">Start Joyride</button>

JS:

class Controller {

    constructor() {
        this.config = [
            {
                type: "title",
                heading: "Welcome to the NG-Joyride demo",
                text: '<div class="row"><div id="title-text" class="col-md-12"><span class="main-text">Welcome to <strong>Ng Joyride Demo</strong></span><br><span>( This demo will walk you through the features of Ng-Joyride. )</span><br/><br/><span class="small"><em>This can have custom html too !!!</em></span></div></div>'

            }
        ];
        this.startJoyRide = false;
    }

    test(){
        this.startJoyRide=true;
    }
}

export default Controller;

だから私は可能な限り単純な構成を持っていますが、ボタンをクリックしても何も表示されません...

また(ボタンをクリックすると)、コンソールにエラーが表示されます $fkEl.size is not a function.

誰かがここで間違いを見たり、なぜ機能しないのか知っていますか?

4

1 に答える 1

0

これは指摘されていますが、まだ修正されていません。こちら: https://github.com/abhikmitra/ng-joyride/issues/67

TL:DR; 開発者はまだそれをjquery 3に更新していません。

彼がそうするまでは、 を に変更.size().length、以前のバージョンの jQuery (私は 2.2.4 を使用しています) を使用していることを確認する必要があります。ダウングレードするだけで違いが生じる可能性があります。

幸運を!

于 2016-11-17T13:36:00.293 に答える