aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorZhenbo Zhang2012-05-09 00:00:38 +0300
committerMisko Hevery2012-09-06 16:06:21 -0700
commitf2b7fffdc0b0ad80cebb24f5fea743e9e4a439d5 (patch)
tree8312908d27009db361ac831e1ff084724e28ffe9 /src/apis.js
parent42c38b29f7dcb3327fe58e630b8e2973676989e0 (diff)
downloadangular.js-f2b7fffdc0b0ad80cebb24f5fea743e9e4a439d5.tar.bz2
fix(ngRepeat): now works with primitive types
closes #933
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];
+ }
}
};