Skip to content

Instantly share code, notes, and snippets.

@BrianGenisio
Created December 3, 2013 01:51
Show Gist options
  • Save BrianGenisio/7762594 to your computer and use it in GitHub Desktop.
Save BrianGenisio/7762594 to your computer and use it in GitHub Desktop.
What does the fox say?
App.directive('whatDoesTheFoxSay', function() {
return {
link: function(scope, element, attrs) {
scope.message = "What does the fox say?";
element.click(function() {
scope.$apply(function() {
scope.message = "Wa-pa-pa-pa-pa-pa-pow!";
});
});
},
template: '<span>{{message}}</span>'
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment