Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

AngularJS 1.2.x does not have bind-html-unsafe anymore. This fixes it. #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rzajac
Copy link

@rzajac rzajac commented Aug 29, 2013

No description provided.

@Rodeoclash
Copy link

+1 This, would be great to get compatibility with 1.2.x

@rogerz
Copy link

rogerz commented Sep 16, 2013

@rzajac I got another error when applying your patch.

Error: [$sce:unsafe] Attempting to use an unsafe value in a safe context.
http://errors.angularjs.org/1.2.0-rc.2/$sce/unsafe
    at http://code.angularjs.org/1.2.0-rc.2/angular.js:78:12
    at htmlSanitizer (http://code.angularjs.org/1.2.0-rc.2/angular.js:10493:13)
    at getTrusted (http://code.angularjs.org/1.2.0-rc.2/angular.js:10657:16)
    at Object.sce.(anonymous function) [as getTrustedHtml] (http://code.angularjs.org/1.2.0-rc.2/angular.js:11289:16)
    at Object.ngBindHtmlWatchAction [as fn] (http://code.angularjs.org/1.2.0-rc.2/angular.js:14891:25)
    at Scope.$digest (http://code.angularjs.org/1.2.0-rc.2/angular.js:9904:27)
    at Scope.$apply (http://code.angularjs.org/1.2.0-rc.2/angular.js:10137:24)
    at http://code.angularjs.org/1.2.0-rc.2/angular.js:1155:15
    at Object.invoke (http://code.angularjs.org/1.2.0-rc.2/angular.js:3156:25)
    at doBootstrap (http://code.angularjs.org/1.2.0-rc.2/angular.js:1153:14) 

@limitium
Copy link

You need to include angular-sanitize module
read here http://docs.angularjs.org/api/ng.directive:ngBindHtml

@cemo
Copy link

cemo commented Oct 23, 2013

+1

@crabmusket
Copy link

Thanks for this. I just had to go through the whole process of not being able to use the element inside an ng-repeat, then realising it replaces numbers with strings, and then not being able to test my changes to rectify that because I couldn't see the bubbles! Great to have a solution I can start from...

@PhilipAnd
Copy link

Any reason why this isn't pull into the master? Would really like to be able to use this with Angular 1.2.

@kit-kanalje
Copy link

@rzajac using your fix on the forked version makes labels work for me, thanks for that.
but i get an error from sanitize's htmlParser on my ng-model variable if it's a number:
TypeError: Object 5000 has no method 'indexOf'
at htmlParser

works if i wrap it in [] or ''

@rzajac
Copy link
Author

rzajac commented Dec 10, 2013

@kit-kanalje i actually rewritten the project in JavaScript you may want to check https://github.com/rzajac/angularjs-slider

@jan-molak
Copy link

Hi @prajwalkman and thank you very much for your excellent work on Angular Slider!
It's a very handy directive which I'm currently using on one of my open source projects - Jenkins Build Monitor.

It would be amazing if you could make Angular Slider compatible with Angular 1.2 whenever you find a free moment :) Thanks!

@rzajac - I tried applying your fix but without much luck I'm afraid; No labels are displayed when using angular 1.2.4 :(

@botverse
Copy link

This one #57 works without the sanitize module

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants