Skip to content

Instantly share code, notes, and snippets.

@jbmilgrom
Last active May 21, 2016 13:20
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/1d95241763895a52564a to your computer and use it in GitHub Desktop.
Save jbmilgrom/1d95241763895a52564a to your computer and use it in GitHub Desktop.
var context = {first: 'steph', last: 'curry'};
// with string
var string = 'last + ", " + first';
var parseFn = $parse(string);
parseFn(context); // => curry, steph
// with function
var func = function(context) {
return context.last + ', ' + context.first;
};
var parseFn = $parse(func);
parseFn(context); // => curry, steph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment