I'm using ng-bind-html to render a html code to my page, but my code is too long. So I put it in a HTML file. How can I do that? This is my HTML and Js controller.My page include this:
<div ng-controller="modalPopup"><div ng-bind-html="renderHtml(message)"></div></div>
JS controller:
angular.module('mainApp', []).
controller('modalPopup', function($scope, $http,$sce) {
$scope.renderHtml = function(value) {
return $sce.trustAsHtml(value);
};
$scope.message = '';
});
I want to put a big block of code HTML to $scope.message
How can I do that. Thanks all :)