简体   繁体   中英

Framework7: how to get HTML of all pages?

I'm using Framework7 which is great. I need to parse innerHTML of all of my pages in runtime. How can I obtain HTML for page different than a current one? I was trying to make use of router , routes and page API's but with no luck.

To sum things up: I don't want to load different pages in the view, I want to load them in a variable to make some further processing. How to do it?

You can use in-build ajax:

Framework7.request.get('somepage.html').then((res) => {  
  console.log(res.data);
});

You can also refer to the docs for further investigations

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM