javascript - Inserting iframe via Angular ng-repeat on view -


i have array of objects, iterating through on view. 1 of fields in object iframe string.

here view code looks like...

<div class="col-md-6" ng-repeat="x in data">     <div class="thumbnail">         <h3 class="pull-left countersettings">#1   </h3>         <div class="embed-responsive embed-responsive-16by9">           {{{x.embed}}}         </div>         <div class="caption">             <div class="row">                 feel: {{x.subreddit}} <br>             </div>             <div class="row">                 <i class="fa fa-arrow-up fa-lg arrowstyle">   {{x.score}} reddit votes</i>             </div>         </div>     </div> </div> 

the triple handle bars using not work. angular throws following error.

error: [$parse:syntax] syntax error: token '.' unexpected, expecting [:] @ column 3 of expression [{x.embed] starting @ [.embed]. http://errors.angularjs.org/1.4.6/$parse/syntax?p0=.&p1=is%20unexpected%2c%20expecting%20%5b%3a%5d&p2=3&p3=%7bx.embed&p4=.embed     @ regex_string_regexp (http://localhost:9000/bower_components/angular/angular.js:68:12)     @ object.ast.throwerror (http://localhost:9000/bower_components/angular/angular.js:13010:11)     @ object.ast.consume (http://localhost:9000/bower_components/angular/angular.js:13022:12)     @ object.ast.object (http://localhost:9000/bower_components/angular/angular.js:12999:14)     @ object.ast.primary (http://localhost:9000/bower_components/angular/angular.js:12905:22)     @ object.ast.unary (http://localhost:9000/bower_components/angular/angular.js:12893:19)     @ object.ast.multiplicative (http://localhost:9000/bower_components/angular/angular.js:12880:21)     @ object.ast.additive (http://localhost:9000/bower_components/angular/angular.js:12871:21)     @ object.ast.relational (http://localhost:9000/bower_components/angular/angular.js:12862:21)     @ object.ast.equality (http://localhost:9000/bower_components/angular/angular.js:12853:21) <div ng-view="" class="ng-scope" data-ng-animate="1"> 

the string in x.embed looks following.

<iframe class=\"embedly-embed\" src=\"//cdn.embedly.com/widgets/media.html?src=https%3a%2f%2fwww.youtube.com%2fembed%2f4xomwqd0dm8%3ffeature%3doembed&url=https%3a%2f%2fwww.youtube.com%2fwatch%3fv%3d4xomwqd0dm8&image=https%3a%2f%2fi.ytimg.com%2fvi%2f4xomwqd0dm8%2fhqdefault.jpg&key=2aa3c4d5f3de4f5b9120b660ad850dc9&type=text%2fhtml&schema=youtube\" width=\"600\" height=\"338\" scrolling=\"no\" frameborder=\"0\" allowfullscreen><\/iframe> 


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -