Skip to content

Instantly share code, notes, and snippets.

@lynndylanhurley
Created January 26, 2015 21:34
Show Gist options
  • Save lynndylanhurley/a1354f24cbd21f68eef7 to your computer and use it in GitHub Desktop.
Save lynndylanhurley/a1354f24cbd21f68eef7 to your computer and use it in GitHub Desktop.
# replace $$value$$ with actual reference to ngModel
# i.e. model['attr'] or model['nested']['attr']
key = ''
if scope.form.key
key = sfPath.stringify(scope.form.key).replace(/"/g, '"')
keyStr = 'model' + (if key[0] != '[' then '.' else '') + key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment