Skip to content

Instantly share code, notes, and snippets.

@lightscalar
Created August 30, 2013 11:47
Show Gist options
  • Save lightscalar/6389072 to your computer and use it in GitHub Desktop.
Save lightscalar/6389072 to your computer and use it in GitHub Desktop.
Tricks
for collection in $scope.collections
  collection.key_length = Object.keys(collection.keys).length
  var first_key
  for k of collection.keys
    first_key = k
    break
  collection.selected_key = collection.keys[first_key]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment