Skip to content

Instantly share code, notes, and snippets.

@the-architect
Created June 21, 2014 10:03
Show Gist options
  • Save the-architect/39d62c0e244a6caba6e6 to your computer and use it in GitHub Desktop.
Save the-architect/39d62c0e244a6caba6e6 to your computer and use it in GitHub Desktop.
Extend Array so it handles indexOf of Angular collections properly
Array::arrayObjectIndexOf = (obj) ->
for elem, i in @
if(angular.equals(elem, obj))
return i
-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment