Advertisement
imehesz

super simple sce usage in Angular 1.2

Apr 15th, 2014
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // could be a directive
  2. webApp.controller("myController", function($scope,$sce){
  3.  var someHtml = "<h1>I am HTML, hear me ROAR!</h1>";
  4.  $scope.someModelVar = $sce.trustAsHtml(someHtml);
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement