I'm trying to create a filter using $sceProvider to unescape the HTML tags.
This is how my code looks like:
myApp.filter('unescapeHtml', function($sce) {
return function(item) {
return $sce.trustAsHtml(item);
};
But when I use this filter in my code, this error occurs.
I searched online about this seems no working solution for me.
I did have this work in another page of my application, the only difference is that the working one is being injected into a controller, like this:
function myController($scope, $http, $sce) {
Did I miss something? I totally have no idea what's going on here, any help will be grateful.
Aucun commentaire:
Enregistrer un commentaire