Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created April 23, 2014 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/11204738 to your computer and use it in GitHub Desktop.
Save willrjmarshall/11204738 to your computer and use it in GitHub Desktop.
Darkswarm.directive "ofnModal", ($modal)->
restrict: 'E'
replace: true
transclude: true
template: "<a>{{title}}</a>"
scope:
title: "@"
link: (scope, elem, attrs, ctrl, transclude)->
console.log transclude()
elem.on "click", ->
scope.modalInstance = $modal.open(template: transclude())
%ofn-modal{title: "Learn more"}
%h3 I'm a modal!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment