Question about architecture: MVVM.
Hello,
I wrote this code source in ViewModel, but doesn't look right!
FormView.html
... <input id="scaleNumber " type="number" data-binding="{@value: formTextBoxText}"/> ...
FormViewModel.js
dojo.declare("FormViewModel", geocortex.framework.ui.ViewModelBase, {
constructor: function () {
$('#scaleNumber').keyup(function () {
this.value = this.value.replace(/[^0-9\.]/g, '');
});
}
});
This code should be in the View? If yes or no, why?
Thanks!!!
0
-
Thank you for your reply it was very useful.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
1 Kommentar