*AngularJS v1.3.0-rc.0*
I've a problem with IE8. The angular ForEach is not working.
*I'm using a real IE8 and can reproduce it.*
In case the obj is an Array, IE8 throws an exception on* isArray(obj). *
*This is because Array.isArray is not supported in IE8 *
function forEach(obj, iterator, context) {
var key, length;
if (obj) {
if (isFunction(obj)) {
for (key in obj) {
// Need to check if hasOwnProperty exists,
// as on IE8 the result of querySelectorAll is an
object without a hasOwnProperty function
if (key != 'prototype' && key != 'length' && key !=
'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
iterator.call(context, obj[key], key);
}
}
} else if (isArray(obj) || isArrayLike(obj)) {
var isPrimitive = typeof obj !== 'object';
for (key = 0, length = obj.length; key < length; key++) {
if (isPrimitive || key in obj) {
Regards
Carsten
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.