prajwalkman / angular-slider

(DEPRECATED) Slider directive implementation for AngularJS, without jQuery dependencies
http://prajwalkman.github.io/angular-slider
MIT License
249 stars 177 forks source link

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

Open rzajac opened 11 years ago

Rodeoclash commented 11 years ago

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

rogerz commented 11 years ago

@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 commented 11 years ago

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

cemo commented 11 years ago

+1

crabmusket commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

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

jan-molak commented 10 years ago

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 commented 10 years ago

This one #57 works without the sanitize module