You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2022. It is now read-only.
Merge pull request #112 from millerscout/ngIntroAsService-fixes
- removed triggers, as it's faster work with callbacks directly and give control to the developer that needs it.
- updated examples.
- added a directive to help disable buttons when needed.
Copy file name to clipboardExpand all lines: README.md
+26-36
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ This project will return the whole angular module so if you want to use as a dep
29
29
30
30
## How to use
31
31
32
-
You can use the two main directives, which are `ng-intro-options` and`ng-intro-method`, or you can include the service called `ngIntroService`
32
+
It's possible to include on your controller the service `ngIntroService` and customize as you need, or you may configure on your view the directives which are `ng-intro-options`, `ng-intro-method` and `ng-intro-disable-button`.
33
33
34
34
### Setting Options
35
35
@@ -49,9 +49,10 @@ The directive will create a method on `$scope.CallMe` so that you can invoke it
49
49
50
50
### Call the start method
51
51
52
-
You can invoke it from an event such a click,
53
-
54
-
`ng-click="CallMe();"`
52
+
You can invoke it from an event such as click.
53
+
`
54
+
ng-click="CallMe();"
55
+
`
55
56
56
57
as long as you are still in the same controller scope. You can also specify a step number in the method call, `CallMe(3);`.
57
58
@@ -74,70 +75,59 @@ Intro.js provides several callbacks. You can receive these callbacks in your co
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`.
86
+
The other intro.js callbacks you can specify are `ng-intro-oncomplete`, `ng-intro-onexit`, `ng-intro-onchange`,`ng-intro-onbeforechange`, `ng-intro-onafterchange`, `ng-intro-onhintsadded`, `ng-intro-onhintclick`and `ng-intro-onhintclose`.
85
87
86
88
### As a service
87
89
88
-
There are two ways of make use of callbacks:
89
-
90
-
**Using promises**
91
-
92
-
The methods that return promises:
90
+
In your controller:
91
+
```javascript
92
+
ngIntroService.onComplete(function(){
93
+
console.log('on complete callback!')
94
+
});
95
+
```
96
+
the list of supported callbacks are:
93
97
94
98
*`onComplete`
95
99
*`onExit`
96
100
*`onBeforeChange`
97
-
*`onAfterChange`
98
101
*`onChange`
99
-
100
-
**Using watches (not recommended, available for compatibility)**
0 commit comments