0

I have an angular model page that has an array images. In my template I have this:

<div slide="slide" ng-repeat="slide in page.images" active="slide.active">

and I have tried to have es5-shim.js imported in all orders of precedence that can be. All other browsers render it correctly , except document mode IE8 (sharepoint 2010 forces this). In that I get:

TypeError: Object doesn't support this property or method<div class="item text-center ng-isolate-scope" active="slide.active" ng-repeat="slide in page.images" slide="slide" ng-transclude ng-class="{&#10;    'active': leaving || (active &amp;&amp; !entering),&#10;    'prev': (next || active) &amp;&amp; direction=='prev',&#10;    'next': (next || active) &amp;&amp; direction=='next',&#10;    'right': direction=='prev',&#10;    'left': direction=='next'&#10;  }" ng-1398662894321="121">

The result is that inside that div, an <img ng-src="{{ slide.url }}" image gets a bad URL.

If I remove es5-shim.js I get also an error about not supported indexOf for the same row. Weird thing is, ng-repeat is working elsewhere in the app where I use angular-treeview.

What type error is this, if not indexOf, and is there a way to fix it?

hhuttunen
  • 57
  • 5
  • 1
    Well, at least `ng-src="{{ slide.url }}"` should be `ng-src="slide.url"` – Chandermani Apr 28 '14 at 05:39
  • Any angular expression inside the div is not processed properly. But you are correct. In that case the value passed to IE8 is `src="slide.url"`. – hhuttunen Apr 28 '14 at 05:43
  • I got this working, by simply reconstructing the ng-repeat. I am happy, but very confused as to what happened/did not happen. It is now `
    ` and working on all (required) browsers o.O
    – hhuttunen Apr 28 '14 at 06:38

1 Answers1

1

you are using "slide directive" => slide="slide" and another slide in ng-repeat="slide in page.images" they are conflicting.

one more suggestion, always prefix your directive. like ct-slide (ctSlide in javascript)

Jeetendra Chauhan
  • 1,977
  • 2
  • 15
  • 21