Questions tagged [ngsanitize]

The `ngSanitize` module provides functionality to sanitize HTML.

See $sanitize for usage.

93 questions
1
vote
1 answer

'ng-bind-html-unsafe' doesn't display anything

I'm displaying a string that has HTML code in it from the JSON. Please check the 'Name' property in the 2nd object. However, when I use 'ng-bind-html-unsafe' it doesn't display anything. I've used ngSanitize as well. Could you please help me figure…
Sunny
  • 902
  • 3
  • 18
  • 41
1
vote
1 answer

Access to ngSanitize in child components

I am trying to use ng-bind-html in a child component and it is not working. From what I read, You need to include ngSanitize. Which I have on am parent component and works fine there but can't get it to work on the child. Any ideas? Please let me…
Marty
  • 65
  • 2
  • 9
1
vote
1 answer

Convert HTML in JSON file with Angular

Now I know to use ngSanitize and ng-bind-html, but can I use it with ng-repeat where I have the following logic:

{{::v["job-title"]}}

{{::v["job-body"]}}

United Kingdom Apply…
eric.dummy
  • 399
  • 1
  • 8
  • 24
1
vote
0 answers

Image Not rendering in Angular js senitize using (ng-bind-html)

I am new to AngularJS, I am developing a single page application using AngularJS.I have a textarea field, using this I am inserting some text with image. It is inserting into the table successfully and when I fetching the record, it is working fine…
abiansh
  • 79
  • 2
  • 2
  • 9
1
vote
2 answers

Angularjs: How to make ui-select have only one way model biding?

With the angularjs navite select directive the model binding is only one way while in ui-select this seems to always be two way binding.
1
vote
1 answer

ng-repeat with ng-bind-html as pre and post-markup

I have an array with multiple objects, similar to this: [ { title: 'abc', 'pre': '
', 'post': '
' }, { title: 'def', 'pre':
', 'post': '
' }, { title: 'ghi', 'pre': '
chrney
  • 257
  • 1
  • 2
  • 12
1
vote
1 answer

AngularJs open external links in an cordova app

using ng-bind-html in cordova app trying to open external link . I have installed InAppBrowser plugin Then i have followed the exact steps from the following https://gist.github.com/rewonc/e53ad3a9d6ca704d402e The code with the filter gets…
user581157
  • 1,327
  • 4
  • 26
  • 64
1
vote
1 answer

angularjs string variable to html element using sanitize

AngularJS code: $scope.checking="
check
"; HTML code:

so i used $sanitize for this one and the ng-bind-html directive to get the job done. So the result in html page is: check and the…
Clyde Dias
  • 195
  • 1
  • 5
  • 18
1
vote
1 answer

Why angular doen't get value of ng-models of inputs, html inserted by $sce.trustAsHtml?

I have this code on my controller: angular.module('reporteadorApp') .controller('sidebarCtrl', ['$scope', '$http', '$cookies', '$sce', function ($scope, $http, $cookies, $sce) { $scope.codeControles = '
1
vote
2 answers

Cannot access value of ng-model variable of bind-unsafe-html

Inside showdetailsOfInside() function value of ng-model variable namein and agein that is inside bind-unsafe-html coming undefined however i have filled text contents into it.I can get value through jquery but is there any way to do it through…
Keshav
  • 821
  • 2
  • 12
  • 33
1
vote
1 answer

ng-bind-html does not display form component like textbox,button

$scope.data="

here we have text boxes and button

"+""+" Name inside
Keshav
  • 821
  • 2
  • 12
  • 33
1
vote
2 answers

Why does an ngSanitize dependency break my app?

To whom it may concern, In effort to bind some html, which, to note, will include angular directives, upon injecting an ngSanitize dependency, my app ceases to render. Any thoughts as to why this happens, and whether my code has any blatant issues?…
1
vote
1 answer

Sanitize Angular JS with double curly bracers

I am trying to display html that i got from server. Example of server response is something like this: '

Hello Mister {{first_name}}

'; So, in my controller I stored this response in $scope variable like this: $scope.centralText.text =…
1
vote
2 answers

Remove encoded html with angularjs

i have a problem in removing html code from a text with the ng-bind-html option of angularjs. My text originally is like this: '<p><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> …
1
vote
1 answer

AngularJS $sce only html safe a[href]

I have a comment textbox and I want only to allow a[href] as safe html with ngSanitize/$sce. So I'm trying this: And inside my contactHiglight directive I have…
Matheus Lima
  • 2,103
  • 3
  • 31
  • 49