Edit this page

modelScope Object (default: "window")

The view model scope. By default, the views will try to resolve their models from the global scope (window).

Example

<div data-role="view" data-model="foo" data-bind="events: {init: onInit }">Bar</div>

<script>
new kendo.mobile.Application($(document.body), {
    modelScope: {
        foo: {
            onInit: function(e) {
                console.log(e);
            }
        }
    }
});
</script>### modelScope `Object` *(default: "window")*

The view model scope. By default, the views will try to resolve their models from the global scope (window).

Example

<div data-role="view" data-model="foo" data-bind="events: {init: onInit }">Bar</div>

<script>
new kendo.mobile.Application($(document.body), {
    modelScope: {
        foo: {
            onInit: function(e) {
                console.log(e);
            }
        }
    }
});
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy