File tree Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Expand file tree Collapse file tree 3 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,24 @@ ngIntroDirective.directive('ngIntro', [function () {
2222
2323 intro . setOptions ( scope [ attrs . ngIntroOptions ] ) ;
2424
25+ if ( attrs . ngIntroOncomplete ) {
26+ intro . oncomplete ( scope [ attrs . ngIntroOncomplete ] ) ;
27+ }
28+
29+ if ( attrs . ngIntroOnexit ) {
30+ intro . onexit ( scope [ attrs . ngIntroOnexit ] ) ;
31+ }
32+
33+ if ( attrs . ngIntroOnchange ) {
34+ intro . onchange ( scope [ attrs . ngIntroOnchange ] ) ;
35+ }
36+
37+ if ( attrs . ngIntroOnbeforechange ) {
38+ intro . onbeforechange ( scope [ attrs . ngIntroOnbeforechange ] ) ;
39+ }
40+
41+
42+
2543 if ( typeof ( step ) == "number" ) {
2644 intro . goToStep ( step ) . start ( ) ;
2745 }
Original file line number Diff line number Diff line change 2020
2121< body >
2222
23- < div class ="container-narrow " ng-controller ="MyController " ng-intro ="" ng-intro-options ="IntroSnippets " ng-intro-method ="CallMe ">
23+ < div class ="container-narrow " ng-controller ="MyController "
24+ ng-intro ="" ng-intro-options ="IntroSnippets " ng-intro-method ="CallMe "
25+ ng-intro-oncomplete ="CompletedEvent " ng-intro-onexit ="ExitEvent "
26+ ng-intro-onchange ="ChangeEvent " ng-intro-onbeforechange ="BeforeChangeEvent ">
2427
2528 < div class ="masthead ">
2629 < ul id ="step5 " class ="nav nav-pills pull-right ">
Original file line number Diff line number Diff line change @@ -2,6 +2,14 @@ var app = angular.module('myApp', ['angular-intro']);
22
33app . controller ( 'MyController' , function ( $scope ) {
44
5+ $scope . CompletedEvent = function ( ) { console . log ( "Completed Event called" ) ; } ;
6+
7+ $scope . ExitEvent = function ( ) { console . log ( "Exit Event called" ) ; } ;
8+
9+ $scope . ChangeEvent = function ( ) { console . log ( "Change Event called" ) ; } ;
10+
11+ $scope . BeforeChangeEvent = function ( ) { console . log ( "Before Change Event called" ) ; } ;
12+
513 $scope . IntroSnippets = {
614 steps :[
715 {
You can’t perform that action at this time.
0 commit comments