Created
June 21, 2014 10:03
-
-
Save the-architect/39d62c0e244a6caba6e6 to your computer and use it in GitHub Desktop.
Extend Array so it handles indexOf of Angular collections properly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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