Skip to content

Instantly share code, notes, and snippets.

@mranosa
Created February 19, 2013 20:23
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 mranosa/4989561 to your computer and use it in GitHub Desktop.
Save mranosa/4989561 to your computer and use it in GitHub Desktop.
promise
michaelw2: $http.get(url).then(function(response) { $scope.myObject = response.data; } )
[04:20am]
michaelw2: when the http request finishes the promise is resolved and the then fn is invoked. it's lexically scoped to the $scope and so it updates the $scope with the results
[04:21am] michaelw2: http transforms allow me to add methods, convert types, etc.
[04:21am] markenranosa: lol deep terms
[04:21am] conorm joined the chat room.
[04:21am] michaelw2: so here's your cheapo angular insight for the day
[04:21am] michaelw2: almost every single feature is there for a really really good reason and understanding that is key to effective use of angular
[04:21am] michaelw2: promises
[04:21am] dauterive left the chat room. (Read error: Connection reset by peer)
[04:22am] michaelw2: http transforms
[04:22am] markenranosa: ok am taking note of that one
[04:22am] bingomanatee left the chat room. (Quit: bingomanatee)
[04:22am
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment