How to cache pages

  • Is it possible to cache page with external html in onsen-ui ?
    TemplateCache from angular doesn’t seem to work properly.

  • Sorry for the late answer.

    Currently we’re changing the behaviour for these things, so whatever we say right now may not be applicable for releases after Onsen 2 RC.15.

    If you want to use it across all onsen components right now you can do this:$onsen, $onsGlobal) {
      $onsGlobal._internal.getPageHTMLAsync = $onsen.getPageHTMLAsync;

    And then you will be able to use $templateCache :smirk_cat:

    However since this may change really soon you may want to keep an eye on issue gh#1209

  • Thank you very much, will do this way until fix comes out.

Log in to reply