0

I am writing a list using ng-repeat as follows:

<div ng-repeat="string in MyCtrl.strings">
  {{ string }}
</div>

Now, the above code, treat the HTML within the string as plain text.

I have modified it as follows:

<div ng-repeat="string in MyCtrl.strings">
  <div ng-include="string"></div>
</div>

But i am getting an error on the console and the div is not showing up any text. "Failed to load resource: the server responded with a status of 404 (Not Found) "

How do i include HTML inside ng-repeat list.

Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
jsbisht
  • 9,079
  • 7
  • 50
  • 55
  • You can take a look an my answer at http://stackoverflow.com/questions/20423565 – Günter Zöchbauer Apr 15 '14 at 18:01
  • I get error on the line template(childInjector, [inner]);" saying only one argument expected. – jsbisht Apr 15 '14 at 18:20
  • There was a breaking change in one of the previous Angular updates. It shouldn't be to hard to find out which one can be omitted. I haven't time just yet to take a close look. Please add another comment if you can't figure it out. – Günter Zöchbauer Apr 15 '14 at 18:23

0 Answers0