D
D
Dmitry Chuprina2016-10-26 19:15:51
Angular
Dmitry Chuprina, 2016-10-26 19:15:51

Who knows how to set non-uniform step for md-slider in angular material?

there is a standard md-slider (from angular matirial )

<md-slider
                                    flex
                                    class="md-primary"
                                    md-discrete
                                    ng-model="item.rating"
                                    step="{{item.step}}"
                                    min="{{item.min}}"
                                    max="{{item.max}}"
                                    aria-label="rating"
                                    ng-change="moreDivice(item.rating,item)"
                            ></md-slider>

usually the step number is put in step - this is understandable and everything would be fine, but what to do is to implement the functionality with a step of a similar image, so that the step would be 10 and then switch to another with an increase of 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 200, 250, 300, 350, 400, 450, 500 . I tried to take a step on the callback when changing the rating, but it turned out to be bad, as if what you need just doesn’t look so hot (stripes with divisions jump back and forth).
Maybe someone has come across something similar. The task is interesting and not standard, although very rare.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question