Skip to content

Instantly share code, notes, and snippets.

@pfallasro
Last active August 29, 2015 13:56
Show Gist options
  • Save pfallasro/9314337 to your computer and use it in GitHub Desktop.
Save pfallasro/9314337 to your computer and use it in GitHub Desktop.
AngularJS very simple directive
app.directive("superman", function () {
return {
restrict:"A";
link: function () {
alert("I'm working")
}
}
})
var myApp = angular.module('myApp', []);
app.directive("superman", function () {
return {
restrict:"E";
template: "<div>Here I am to save the day</div>"
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment