*Hi, * *How can i bind a html code into a div, that has angular features inside ?*
*Example:* <script type="text/javascript" src="http://ci.angularjs.org/job/angular.js-angular-master/ws/build/angular.js"></script> <script type="text/javascript" src="http://ci.angularjs.org/job/angular.js-angular-master/ws/build/angular-sanitize.js"></script> <html ng-app> <head> <script> function Ctrl($scope, $sce) { $scope.var = "My Headline"; $scope.ngHtmlSnippet = "Headline:<h1>{{ var }}</h1>"; $scope.deliberatelyTrustDangerousSnippet = function() { return $sce.trustAsHtml($scope.ngHtmlSnippet); }; } </script> </head> <body ng-controller="Ctrl"> <textarea ng-model="ngHtmlSnippet" cols="60" rows="3"></textarea> <div ng-bind-html="deliberatelyTrustDangerousSnippet()"></div> </body> </html> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
