简体   繁体   English

如何让应用程序返回自己的搜索结果,以便离线快速页面导航?

[英]How to make an app return search results within itself for quick page navigation offline?

I am building a multi-page mobile application that will be run offline but it needs to be able to search for pages within itself for users to navigate around the application easy. 我正在构建一个将在线下运行的多页移动应用程序,但它需要能够在自身内搜索页面,以便用户轻松浏览应用程序。 So far everything I see online for advice about this involves or Jquery menu, and both to the best of my knowledge perform searches online with servers. 到目前为止,我在网上看到的有关此建议的所有内容涉及或Jquery菜单,并且据我所知,两者都使用服务器在线进行搜索。 What is the best advice for the element to use or direction to go for me to build a search bar where users enter a search and a list of items that are the available pages within the app appear so that the user can select on the results and navigate to those pages quickly? 什么是使用元素的最佳建议或指导我建立一个用户输入搜索的搜索栏,并显示应用程序中可用页面的项目列表,以便用户可以选择结果和快速导航到那些页面? I am completely new and fumbling my way though this, I appreciate any help I can get 尽管如此,我是全新的,并且摸索着我的方式,我感谢任何帮助

I would add a json object like: 我会添加一个json对象,如:

{
    pages: [
        'home': '/home',
        'options': '/options',
        'etc': '/etc'
    ]
}

and use that as your data for your search to return from. 并将其用作您的搜索返回数据。 Not incredibly clean, but serves the purpose. 不是非常干净,但服务的目的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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