Skip to content

Instantly share code, notes, and snippets.

@jbmilgrom
Last active May 19, 2016 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbmilgrom/330354b717613e6f5a26 to your computer and use it in GitHub Desktop.
Save jbmilgrom/330354b717613e6f5a26 to your computer and use it in GitHub Desktop.
scope.$watch('greeting', function(greeting) {
console.log('greeting: ', greeting);
});
scope.greeting = 'hi there'; // greeting: hi there
$timeout(function() { scope.greeting += ', Joe'}); // greeting: hi there, Joe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment