You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with using a formatter together with ngModel. As far as I understand, when using a formatter you are supposed to provide 'formatted' values for ngModel. Because if I don't, then the sliders will not begin at the correct positions. However, when changing the sliders, 'unformatted' values are assigned back to the ngModel property.
For instance, if I begin with something like
model = ['#1', '#2']; // Formatted values
[(ngModel)]="model",
[format]="someFormatter"
...and provide a formatter that maps back and forth between numbers and strings, then after dragging the slider, the value of the model property will be an (unformatted) array of numbers instead of the expected array of (formatted) strings.
This might be related to #50 . Is this something you're aware of? I could probably provide an example project, but will not bother if you're already aware of this issue.
The text was updated successfully, but these errors were encountered:
Hi!
Thanks for providing this component!
I have a problem with using a formatter together with ngModel. As far as I understand, when using a formatter you are supposed to provide 'formatted' values for ngModel. Because if I don't, then the sliders will not begin at the correct positions. However, when changing the sliders, 'unformatted' values are assigned back to the ngModel property.
For instance, if I begin with something like
...and provide a formatter that maps back and forth between numbers and strings, then after dragging the slider, the value of the
model
property will be an (unformatted) array of numbers instead of the expected array of (formatted) strings.This might be related to #50 . Is this something you're aware of? I could probably provide an example project, but will not bother if you're already aware of this issue.
The text was updated successfully, but these errors were encountered: