Framework7 - URL 查询



描述

如果您正在使用 Template7 渲染 Ajax 页面,其上下文将始终扩展一个名为 url_query 的特殊属性,该属性包含如下所示的 URL GET 参数:

index.html
<a href = "projects.html?pname = XYZ&duration = 12months&cost = 500000" 
   class = "item-link item-content">Project</a>

projects.html

<div class = "page" data-page = "person">
   <div class = "page-content">
      <div class = "content-block">
         <div class = "content-block-inner">
            <p><b>Project working on :</b> {{url_query.pname}}</p>
            
            <b>Duration :</b> {{url_query.duration}}</p>
            
            <p><b>Cost :</b> {{url_query.cost}}</p>
         </div>
      </div>
   </div>
</div>
framework7_template7_pages.htm
广告