Skip to content

Commit 56f76b2

Browse files
author
mendhak
committed
Updated README and example in app.js
1 parent 19f5544 commit 56f76b2

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ Intro.js provides several callbacks. You can receive these callbacks in your co
5252

5353
In your controller, create `ChangeEvent`
5454

55-
$scope.ChangeEvent = function (targetElement) {
55+
$scope.ChangeEvent = function (targetElement, scope) {
5656
console.log("Change Event called");
57-
console.log(targetElement);
57+
console.log(targetElement); //The target element
58+
console.log(this); //The IntroJS object
5859
};
5960

6061
The other intro.js callbacks you can specify are `ng-intro-oncomplete`, `ng-intro-onexit`, `ng-intro-onchange` `ng-intro-onbeforechange` and `ng-intro-onafterchange`.

build/angular-intro.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/app.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@ var app = angular.module('myApp', ['angular-intro']);
22

33
app.controller('MyController', function ($scope) {
44

5-
$scope.CompletedEvent = function () {
5+
$scope.CompletedEvent = function (scope) {
66
console.log("Completed Event called");
77
};
88

9-
$scope.ExitEvent = function () {
9+
$scope.ExitEvent = function (scope) {
1010
console.log("Exit Event called");
1111
};
1212

13-
$scope.ChangeEvent = function (targetElement) {
13+
$scope.ChangeEvent = function (targetElement, scope) {
1414
console.log("Change Event called");
15-
console.log(targetElement);
15+
console.log(targetElement); //The target element
16+
console.log(this); //The IntroJS object
1617
};
1718

18-
$scope.BeforeChangeEvent = function (targetElement) {
19+
$scope.BeforeChangeEvent = function (targetElement, scope) {
1920
console.log("Before Change Event called");
2021
console.log(targetElement);
2122
};
2223

23-
$scope.AfterChangeEvent = function (targetElement) {
24+
$scope.AfterChangeEvent = function (targetElement, scope) {
2425
console.log("After Change Event called");
2526
console.log(targetElement);
2627
};

0 commit comments

Comments
 (0)