Last active
August 29, 2015 14:15
-
-
Save constellates/00ebcd0e1293c3e28c8e to your computer and use it in GitHub Desktop.
Overlay Directive
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app').directive('overlay', overlay); | |
function overlay () { | |
return { | |
restrict: 'E', | |
transclude: true, | |
scope: {active: '=', text: '='}, | |
template: '<div class="introjs-overlay" ng-show="active" ng-click="active = false;"></div>' + | |
'<div class="mock-intro" ng-show="active">' + | |
'<div class="mock-intro-text" ng-show="active">{{text}}</div>' + | |
'<div ng-transclude ng-show="active"></div>' + | |
'</div>' + | |
'<div ng-show="!active" ng-transclude></div>' | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment