I suggest you ...

Provide a syntax to "navigate" MVVM models

In the context of MVVM bindings, it would be great to have a way to evaluate certain conditions/expressions, especially within template bindings, by "navigating" to other properties of the ViewModel, or to other properties of the currently iterated object.

For example:

<ul data-role="listview" data-bind="source: anObservableObject" data-template="some-template"></ul>
<script id="some-template" type="text/x-kendo-template">
<li data-bind="text: whatever, visible: $source.someProperty == $data.otherProperty"></li>
</script>

In this example, $data refers to the current iteration data, and $source refers to the source. So the visible binding would be true/false according to the expression which would evaluate an arbitrary property on the source and an arbitrary property on the iterated object.

This is similar to Knockout's mechanism and it allows for greater flexibility within templates.

26 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Luc MorinLuc Morin shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base