aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorZhenbo Zhang2012-05-09 00:00:38 +0300
committerMisko Hevery2012-08-30 21:34:41 -0700
commit98d489712eff7559bce87ae53bd242112a875c1a (patch)
tree396a38861b2d7c204e86cb537da0ebc74b0a5179 /src/apis.js
parent2cab2d8ef1c2ad2aa919b5a8ad5948977a1b6b84 (diff)
downloadangular.js-98d489712eff7559bce87ae53bd242112a875c1a.tar.bz2
fix(ng-repeat) to work with primitive types
Diffstat (limited to 'src/apis.js')
-rw-r--r--src/apis.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/apis.js b/src/apis.js
index 7b470802..098d9cdd 100644
--- a/src/apis.js
+++ b/src/apis.js
@@ -97,5 +97,15 @@ HashQueueMap.prototype = {
return array.shift();
}
}
+ },
+
+ /**
+ * return the first item without deleting it
+ */
+ peek: function(key) {
+ var array = this[key = hashKey(key)];
+ if (array) {
+ return array[0];
+ }
}
};