angular-summernote
angular-summernote copied to clipboard
Error: [$sce:unsafe] Attempting to use an unsafe value in a safe context.
I am trying to add summernote to my project. I followed the instruction given in the documentation. But unfortunately getting the following error in the browser -
Error stacktrace:
Error: [$sce:unsafe] Attempting to use an unsafe value in a safe context.
http://errors.angularjs.org/1.3.15/$sce/unsafe
at angular.js:63
at htmlSanitizer (angular.js:15142)
at getTrusted (angular.js:15306)
at Object.sce.
Angularjs version: 1.3.15 jquery version: 1.11.1 summernote version: 0.8.15 angular-summernote version: 0.8.1
editor-controller.js:
app.controller("EditorController", ['$scope',
function($scope) {
console.log('Edit Controller');
$scope.html = "";
$scope.options = {
height: 250,
toolbar: [
['style', ['bold', 'italic', 'underline', 'clear', 'formatH1']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['height', ['height']]
]
};
}
]);
ap.js:
var app = angular
.module('myApp', [
// 'angular-loading-bar', !! Removed for now, as this creates greater perceived slowness. !!
// 'textAngular',
'summernote',
]);
page.html:
<summernote ng-model="description" placeholder="Description"></summernote>
N.B: I previously used textAngular. Since the community of textAngular are no longer active, I decided to switch to summernote. But this problem makes me disappointed. They were using textAngular-sanitize.min.js to relsolve this kind of problem. Is there something we needed to add for summernote?