aboutsummaryrefslogtreecommitdiffstats
path: root/src/apis.js
diff options
context:
space:
mode:
authorZhenbo Zhang2012-05-09 00:00:38 +0300
committerMisko Hevery2012-08-30 15:20:40 -0700
commit0a71753ce3f4fe241e15fa489617b82710be4648 (patch)
tree54877a72b6621b469f89f45f26acdee4310b973d /src/apis.js
parent1a8642aac2de40dccdab464e58dc164006c300bb (diff)
downloadangular.js-0a71753ce3f4fe241e15fa489617b82710be4648.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];
+ }
}
};