Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

AngularJs material-slider does not work within ng-repeat #391

Closed
sunny9240 opened this issue Oct 8, 2014 · 10 comments
Closed

AngularJs material-slider does not work within ng-repeat #391

sunny9240 opened this issue Oct 8, 2014 · 10 comments
Labels
a11y This issue is related to accessibility

Comments

@sunny9240
Copy link

material-slider ng-model sets aria-valuenow="NaN"

When slider loads at first time it returns aria-valuenow="NaN" but when i slide values over slider it works properly. can anybody help me out please ?

material-slider when first time page load

material-slider class="ng-isolate-scope ng-pristine ng-untouched ng-valid" step="1" ng-model="answer.value" max="70" min="21" flex="" aria-disabled="false" tabindex="0" role="slider" aria-valuenow="NaN" aria-valuemax="70" aria-valuemin="21"

@marcysutton marcysutton added a11y This issue is related to accessibility type: bug and removed type: bug labels Oct 8, 2014
@marcysutton
Copy link
Contributor

Hi, can you provide a jsfiddle or plunker demo so we can look at your code?

@sunny9240
Copy link
Author

Hi @marcysutton , i have found the problem.

material-slider does not work within ng-repeat.

when i have used material-slider without ng-repeat the slider sets on its proper position and aria-valuenow is also set with its proper value, but when i have used material-slider within ng-repeat the aria-valuenow="NaN" and slider is not set with its proper position.

Please take a look over below demo example and try to give me a better solution for this problem.

Plunker demo of problem - http://plnkr.co/edit/PslB2p?p=preview

@sunny9240 sunny9240 changed the title material-slider ng-model returns NaN in aria-valuenow AngularJs material-slider does not work within ng-repeat Oct 10, 2014
@wieslawmlynarski
Copy link

It seems that, the slider does not see the scope higher than ng-repeat.
This example also does not work.

{{test.number}} {{dummy}}

2014-10-10 11:56 GMT+02:00 sunnyshah24 notifications@github.com:

Hi, i have found the problem.
material-slider is not working with in ng-repeat.

when i have used material-slider without ng-repeat the slider sets on its
proper position and aria-valuenow was also set with its proper value, but
when i have used material-slider within ng-repeat the aria-valuenow="NaN"
and slider is not set with its proper position.

Please take a look over below demo example and try to help me.

Plunker demo of problem - http://plnkr.co/edit/PslB2p?p=preview
http://plnkr.co/edit/PslB2p?p=preview


Reply to this email directly or view it on GitHub
#391 (comment).

@sunny9240
Copy link
Author

hello, @wieslawmlynarski

Can you suggest me any solution for this problem ?

@tomups
Copy link

tomups commented Oct 22, 2014

+1

1 similar comment
@sonnylazuardi
Copy link

+1

@sonnylazuardi
Copy link

@RayMcCoy @sunnyshah01 may be solved with this pull request

@sunny9240
Copy link
Author

Thank you so much for solving this problem.

@ThomasBurleson
Copy link
Contributor

Fixed in #461

@Arti3DPlayer
Copy link

Still not works:

<md-slider-container flex ng-repeat="n in tpakp track by $index">
                            {{tpakp[$index]}}
                            <md-slider ng-model="tpakp[$index]" ng-change="tpaSliderChange($index)" min="0" max="200" aria-label="{{ 'tpakp'+$index }}" class="md-accent" md-vertical md-range></md-slider>
                        </md-slider-container>

screen shot 2017-05-05 at 13 12 17

       "angular": "1.5.9",
        "angular-animate": "1.5.9",
        "angular-aria": "1.5.9",
        "angular-chart.js": "1.1.1",
        "angular-cookies": "1.5.9",
        "angular-material": "1.1.0",
        "angular-messages": "1.5.9",
        "angular-resource": "1.5.9",
        "angular-route": "1.5.9",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a11y This issue is related to accessibility
Projects
None yet
Development

No branches or pull requests

7 participants