Angular-intro.js不起作用

时间:2017-01-02 11:27:04

标签: javascript angularjs intro.js

在逐步进行的过程中,我已在步骤中应用ng-if条件...如果angular-intro.js中的任何条件失败,如何继续?

<a ng-intro-options="IntroOptions" ng-intro-method="CallMe"
     ng-intro-oncomplete="CompletedEvent" ng-intro-onexit="ExitEvent"
     ng-intro-onchange="ChangeEvent" ng-intro-onbeforechange="BeforeChangeEvent"
     ng-intro-autostart="false" ng-click="CallMe();">
<span class="pull-right">
<i class="fa fa-question fa-md" aria-hidden="true" title="Help"></i>
</span>
</a>
<div id="step1">welcome</div>
<div ng-if="admin" id="step2">hello nice to meet you Admin</div>
<div id="step3">list of tasks for the day {{user}}</div>

和我的controller

$scope.IntroOptions = {
    steps:[
    {
      element: '#step1',
      intro: 'Search data from current list. Advanced Search helps you find data with respective columns.',
      position: 'bottom'
    },
    {
      element: '#step2',
      intro: 'Click on Add icon to add new Channel.',
      position: 'left'
    },
    {
      element: '#step3',
      intro: 'List of all channels.',
      position: 'top'
    }
    ],
    showStepNumbers: false,
    showBullets: false,
    exitOnOverlayClick: true,
    exitOnEsc:true,
    nextLabel: '<strong>NEXT!</strong>',
    prevLabel: '<span style="color:green">Previous</span>',
    skipLabel: 'Exit',
    doneLabel: 'Thanks'
  };

ng-if条件为' admin '时,它的工作正常。
但是当条件未通过step1结束时,如果ng-if如何直接继续执行step3条件失败。

0 个答案:

没有答案