Skip to content

Instantly share code, notes, and snippets.

@knalli
Last active December 15, 2015 15:28
Show Gist options
  • Save knalli/5281687 to your computer and use it in GitHub Desktop.
Save knalli/5281687 to your computer and use it in GitHub Desktop.
Example of a dialog directive
angular.module('app').directive('dialog', function(){return{
template : '<div class="dialog dialog-{{type}}">'+
'<header><h1>{{title}}</h1></header>'+
'<button>No</button><button>Yes</button>'+
'</div>',
restrict: 'E',
replace: true,
scope: {
'title' : '@',
'type' : '@'
}
};});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment