Skip to content

Commit a309231

Browse files
committed
added attribute wid, id to set to walkthrough
1 parent dd87d42 commit a309231

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ and use one of the two configurations:
120120

121121
## Directive Attributes
122122

123+
- `wid` (optional) - The id to set to the walkthrough when open
123124
- `is-active` (mandatory) - Any walkthrough type. Bound element controls display the directive. Set 'true' to bound element in order to display.
124125
- `walkthrough-type` (mandatory) - Any walkthrough type. Specifies what type of walkthrough to display. Currently supported are 'transparency' and 'tip' types
125126
- `focus-element-selector` (optional) - Any walkthrough type. CSS selector of DOM element we want to give focus to, if value set to empty string "" all screen will be grayed out. Throws warning if multiple elements return as results and displays first as selected

ng-walkthrough.js

+4
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ angular.module('ng-walkthrough', [])
6666
walkthroughType: '@',
6767
isActive: '=',
6868
icon: '@',
69+
wid: '@?',
6970
focusElementSelector: '@?',
7071
mainCaption: '@?',
7172
forceCaptionLocation: '@?',
@@ -449,6 +450,9 @@ angular.module('ng-walkthrough', [])
449450
angular.element(document.body).append(template);
450451
setWalkthroughElements();
451452
var walkthroughElement = angular.element(document.querySelectorAll('.' + DOM_WALKTHROUGH_CLASS));
453+
if (scope.wid !== undefined && scope.wid !== null && scope.wid.length>0) {
454+
walkthroughElement.attr('id', scope.wid);
455+
}
452456
$compile(walkthroughElement)(scope);
453457
};
454458

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ng-walkthrough",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"homepage": "https://github.com/souly1/ng-walkthrough",
55
"authors": [
66
"Ophir Stern <souly01@gmail.com>"

0 commit comments

Comments
 (0)