It would be nice to have some additional "flow control" for the MVVM framework, including ... "if" - <div data-bind="if: [property]"> // renders if the given value is true </div> and "not" <div data-bind="not: enabled"> // renders if the given value is false </div> and "each" <div data-bind="each: array"> // renders this section for each item in the array given </div> I know some of this can be achieved with templates, but this would make it very convenient and mean we did not have to use templates everywhere, and could lead to much more natural coding.
MVVM is still lacking some of the capability that is provided by the standard widgets. For example a tooltip cannot bind it's content property to a function in a viewmodel.
There are issues with null values not correctly binding without using a custom binder. See demo project here: http://www.kendoui.com/code-library/mvc/grid/binding-nullable-field-to-dropdownlist-editor-in-grid.aspx Forum post here: http://www.kendoui.com/forums/mvc/grid/nullable-property-in-grid-doesn't-update-(when-bound-to-combobox).aspx
Suppose a model is defined with settings for editable, required, validation, etc. Then this model is used a datasource's schema. Instances of the datasource's data will be models. However, if a model is bound to some HTML view, it's settings are not applied to the view. All settings have to be manually applied to the HTML elements. I suggest that these settings are applied automatically. Then for example, a field's property like "required" wouldn't have to be coded at two different places.
Hi Andrew, Can you give me a scenario where a writable computed observable would be required? As the KO site states, these are very uncommon, mainly because the computed nature of the observable makes them unnecessary. If you need an update, set one or more of the dependent observables, and the computer observable also reflects the change.