我目前正在尝试让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
.
有没有人在这里看到错误,或者知道为什么它不起作用?