title: kendo ui set view model page data-title dynamically mvvm
body: <p>I am trying to set the title of my view dynamically with no success so far.
  I am trying something like this:</p>
  
  <pre><code>&lt;div data-role="view"
   id="mt-details-view"
   data-title="#= pageTitle #" &lt;---- this one
   data-layout="mt-main-layout"
   data-init="X.details.onInit"
   data-before-show="X.details.beforeShow"
   data-show="X.details.onShow"
   data-model="X.details.viewModel"
   data-use-native-scrolling="true"&gt;
  </code></pre>
  
  <p>I tried using a function, tried setting a viewModel variable, tried passing the title from the <code>view.params</code>, tried also to set the title on the <code>onShow</code> function like that:</p>
  
  <pre><code>function onShow(e) {
      X.debug.dbg2(e.view.id, "onShow");
      viewModel.setViewParams(e.view.params);
      e.view.title = e.view.params.pageTitle;
      e.view.options.title = e.view.params.pageTitle;
      fetchSomeDetails();
  }
  </code></pre>
  
  <p>nothing works.</p>
  
  <p>Enlighten me please!</p>