angular-slider icon indicating copy to clipboard operation
angular-slider copied to clipboard

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

Open rzajac opened this issue 12 years ago • 10 comments

rzajac avatar Aug 29 '13 13:08 rzajac

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

Rodeoclash avatar Sep 06 '13 08:09 Rodeoclash

@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) 

rogerz avatar Sep 16 '13 02:09 rogerz

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

limitium avatar Sep 17 '13 13:09 limitium

+1

cemo avatar Oct 23 '13 15:10 cemo

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...

crabmusket avatar Nov 20 '13 05:11 crabmusket

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

PhilipAnd avatar Nov 23 '13 20:11 PhilipAnd

@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 ''

kit-kanalje avatar Dec 02 '13 13:12 kit-kanalje

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

rzajac avatar Dec 10 '13 19:12 rzajac

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 :(

jan-molak avatar Dec 12 '13 00:12 jan-molak

This one #57 works without the sanitize module

botverse avatar Jan 14 '14 15:01 botverse