Skip to content

Instantly share code, notes, and snippets.

@constellates
Last active August 29, 2015 14:15
Show Gist options
  • Save constellates/00ebcd0e1293c3e28c8e to your computer and use it in GitHub Desktop.
Save constellates/00ebcd0e1293c3e28c8e to your computer and use it in GitHub Desktop.
Overlay Directive
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