Created
October 3, 2013 03:00
-
-
Save djadriano/6804116 to your computer and use it in GitHub Desktop.
lightbox angularjs directive
This file contains 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
EurodanceApp.directive('modal', function($compile){ | |
var template = '<h2>{{title}}</h2><p>{{content}}</p>'; | |
return { | |
restrict : 'A', | |
scope : true, | |
link : function( scope, element, attrs ) { | |
scope.title = attrs.title; | |
scope.content = 'conteudo do lightbox'; | |
var new_template = $compile( template )( scope ); | |
element.append( new_template ); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment