Skip to content

Instantly share code, notes, and snippets.

@edysegura
Created December 12, 2014 12:57
Show Gist options
  • Save edysegura/357d5cfb312a04f19244 to your computer and use it in GitHub Desktop.
Save edysegura/357d5cfb312a04f19244 to your computer and use it in GitHub Desktop.
How to observer an attribute in AngularJS directive
return function(scope, element, attrs) {
attrs.$observe('key', function(value) {
console.log('key=', value);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment