Tuesday 15 March 2011

javascript - Writing Html To View With Recent Version Angular JS -



javascript - Writing Html To View With Recent Version Angular JS -

i brand new angular question hard inquire , describe.

the lastly stack overflow question posted regarding writing html page angular js posted on 2 years ago , have not been able work.

basically, trying write html iframe stored in variable in homecontroller view.

i trying utilize angular-sanitize.min.js.

//the code within homecontroller

$scope.audioplayer = '<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3a//api.soundcloud.com/tracks/47990402&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>';

// on html view page code has been added

<div class="songplayer" ng-bind-html="audioplayer"></div>

all of other variables passed html view load correctly within {{templating}} tags.

javascript angularjs

No comments:

Post a Comment