title: onsen ui: persist dynamically added content
body: <p>I have a sliding-menu with two items page1 and page2:</p>
  
  <pre><code>&lt;body ng-controller="PageController" &gt;
  &lt;ons-sliding-menu main-page="page1.html"
                    menu-page="menu.html"
                    side="left"
                    max-slide-distance="250px"
                    var="menu"&gt;
  &lt;/ons-sliding-menu&gt;
  &lt;ons-template id="page1.html"&gt;
      &lt;ons-page &gt;
          &lt;ons-toolbar &gt;
              &lt;div class="left"&gt;
                  &lt;ons-toolbar-button ng-click="menu.toggleMenu()"&gt;&lt;ons-icon icon="ion-navicon" style="font-size: 32px; width: 1em;"&gt;&lt;/ons-icon&gt;&lt;/ons-toolbar-button&gt;
              &lt;/div&gt;
              &lt;div class="center lang" &gt;Page 1&lt;/div&gt;
          &lt;/ons-toolbar&gt;
  
          &lt;div class="template-content" &gt;
  
          &lt;/div&gt;
      &lt;/ons-page&gt;
  &lt;/ons-template&gt;
  &lt;ons-template id="page2.html"&gt;
      &lt;ons-page&gt;
          &lt;ons-toolbar&gt;
              &lt;div class="left"&gt;
                  &lt;ons-toolbar-button onclick="menu.toggleMenu()"&gt;&lt;ons-icon icon="ion-navicon" style="font-size: 32px; width: 1em;"&gt;&lt;/ons-icon&gt;&lt;/ons-toolbar-button&gt;
              &lt;/div&gt;
              &lt;div class="center"&gt;Page 2&lt;/div&gt;
          &lt;/ons-toolbar&gt;
          &lt;div class="template-content"&gt;
  
          &lt;/div&gt;
      &lt;/ons-page&gt;
  &lt;/ons-template&gt;
  &lt;ons-template id="menu.html"&gt;
      &lt;ons-list&gt;
          &lt;ons-list-item modifier="chevron" onclick="menu.setMainPage('page1.html', { closeMenu: true })"&gt;
              Page 1
          &lt;/ons-list-item&gt;
          &lt;ons-list-item modifier="chevron" onclick="menu.setMainPage('page2.html', { closeMenu: true })"&gt;
              Page 2
          &lt;/ons-list-item&gt;
      &lt;/ons-list&gt;
  &lt;/ons-template&gt;
  </code></pre>
  
  <p></p>
  
  <p>When I append dynamic content via jQuery ondeviceready event:</p>
  
  <pre><code> $('.template-content').append('&lt;p&gt;Hello World&lt;/p&gt;');
  </code></pre>
  
  <p>I will see the content at first time but when I change the view to page2 and then again to page1 the content I dynamically added is vanished. I think everytime the view changes onsen ui will destroy the dom.</p>
  
  <p>How can I prevent onsen ui to destroy the dom ? 
  So that my dynamically content will be persisted.</p>
  
  <p>I found the "persistent" attribute but this doesn't work in my case.</p>
  
  <p>Thank you in advance!</p>