Created
December 3, 2013 01:51
-
-
Save BrianGenisio/7762594 to your computer and use it in GitHub Desktop.
What does the fox say?
This file contains hidden or 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
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