Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

"Value" of progress element does not bind in IE11 #12322

Closed
omarmeky opened this issue Jul 10, 2015 · 3 comments
Closed

"Value" of progress element does not bind in IE11 #12322

omarmeky opened this issue Jul 10, 2015 · 3 comments

Comments

@omarmeky
Copy link

If I do something like:

<progress max="100" value="{{progress}}"></progress>

It displays correctly on browsers besides IE11 (haven't tested older versions of IE). On IE11, it always evaluates to "0"

I am using my own directive to bypass this issue:

<progress max="100" progress-bar-value="progress"></progress>

.directive('progressBarValue', ['$parse', function($parse) {
            return {
                restrict: 'A',
                link: function(scope, elem, attrs) {
                    scope.$watch(attrs.progressBarValue, function() {
                        elem.attr('value', $parse(attrs.progressBarValue)(scope));
                    });
                }
             };
         }]);
@langdonx
Copy link

Funny, I was just dealing with something similar myself. It seems like standard attributes with interpolation have issues in IE11.

Your issue in a Fiddle: http://jsfiddle.net/langdonx/6qcs6yee/

Related issue I filed a moment ago: #12324

ETA: In your case you can use ng-attr-value, via:

@Narretz
Copy link
Contributor

Narretz commented Jul 10, 2015

There's also ngValue, which should work for this use-case, too.

@Narretz
Copy link
Contributor

Narretz commented Jul 10, 2015

Closing as dupe of #7218

@Narretz Narretz closed this as completed Jul 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants