Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Last active August 29, 2015 14:00
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/11204565 to your computer and use it in GitHub Desktop.
Save willrjmarshall/11204565 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)->
elem.on "click", ->
scope.modalInstance = $modal.open(template: elem.html())
# HAML:
%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