If I navigate to a page, either in code (using app.navigate) or using a link in the Drawer I'm finding that the page does not databind if that page is already open.
To reproduce the issue, create a new Hybrid Kendo UI Drawer project and paste the following code into home.html:
<
div
data-role
=
"view"
data-title
=
"Home"
data-layout
=
"main"
data-model
=
"APP.models.home"
data-reload
=
"true"
>
<
h1
data-bind
=
"html: title"
id
=
"title"
></
h1
>
<
button
type
=
"button"
data-role
=
"button"
data-click
=
'foo'
class
=
"btn-ok"
>Reload</
button
>
</
div
>
<
script
>
function foo() {
var d = new Date();
var n = d.toLocaleTimeString();
APP.models.home.title = "Reloaded at " + n;
app.navigate("views/home.html", "");
}
</
script
>
The "var app;" in app.js will also need to be moved up to the first line in the file.
The first time the home page loads the default title is displayed. Pressing the "Reload" button changes the title in the model and navigates to the home page, but the title displayed on the page remains unchanged, even though the value in the model has changed. Selecting "Home" from the application drawer has the same problem. The only way I can find to force a databind is to navigate to ANOTHER page and then to the home page.
Any ideas how I can resolve this issue?