简体   繁体   中英

How can I match the value of a slider to an angularjs variable?

What I want is to match: the maximum and minimum value of the slide to the variable to filter filterModelMin.precio.

I did it this way but it throws me an error.

<rzslider rz-slider-model="slider.minValue"
          rz-slider-high="slider.maxValue"
          rz-slider-options="slider.options"></rzslider>
              </div>
              <input   ng-model="filterModelMin.precio =slider.minValue">
               <input   ng-model="filterModelMax.precio= slider.maxValue">

  <a flex ng-repeat="apartament in apartaments | dynamicFilter:Filters:this | filter:byRange('precio', filterModelMin.precio, filterModelMax.precio)| filter:{departamento:ordenSeleccionado, municipio: ordenSeleccionadomuni}"
          ng-href="{{ post.url }}">

Since the ng-model expressions are illegal, it is unclear what you are trying to accomplish.

Possibly you want:

̵<̵i̵n̵p̵u̵t̵ ̵n̵g̵-̵m̵o̵d̵e̵l̵=̵"̵f̵i̵l̵t̵e̵r̵M̵o̵d̵e̵l̵M̵i̵n̵.̵p̵r̵e̵c̵i̵o̵ ̵=̵s̵l̵i̵d̵e̵r̵.̵m̵i̵n̵V̵a̵l̵u̵e̵"̵>̵
̶<̶i̶n̶p̶u̶t̶ ̶n̶g̶-̶m̶o̶d̶e̶l̶=̶"̶f̶i̶l̶t̶e̶r̶M̶o̶d̶e̶l̶M̶a̶x̶.̶p̶r̶e̶c̶i̶o̶=̶ ̶s̶l̶i̶d̶e̶r̶.̶m̶a̶x̶V̶a̶l̶u̶e̶"̶>̶

<div>{{ filterModelMin.precio=slider.minValue }}</div>
<div>{{ filterModelMax.precio=slider.maxValue }}</div>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM