how do I load pages dynamically in framework7 v2?
A new page, such as
, can be loaded through mainView.router.loadContent (), in v1.var viewHTML = $("<div class="navbar">" +
"<div class="navbar-inner">" +
"<div class="left">" +
"<a href="-sharp" class="back link"><i class="iconfont icon-back"></i></a>" +
"</div>" +
"<div class="center sliding" id="" + this.options.titleID + "">" + this.options.title + "</div>" +
"<div class="right">" +
"<a id="" + this.options.rightContent.id + "" href="" + this.options.rightContent.href + "" class="link icon-only">" + this.options.rightContent.text + "</a>" +
"</div>" +
"</div>" +
"</div>" +
"<div class="page" id="" + this.options.id + "" data-page="" + this.options.id + "">" +
"<div class="page-content" id="" + this.options.contents.id + "">" +
this.options.contents.content +
"</div>" +
"</div>");
mainView.router.loadContent(viewHTML);
how is it loaded in this way in v2? After reading the document for a long time, the operation failed for a long time
has anyone done it? Do you use app.views.create () and app.views.get ()?
or another method?
Thank you