While going from step-to-step i have applied ng-if
condition on step... how to continue if any of if condition fails in 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>
and in my 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'
};
Its working perfectly when ng-if
condition is 'admin'.
But when if condition fails its ending with step1 how can I continue with step3 directly if ng-if
condition fails.