angular.js - angular 模糊查询是前端做还是后台做?
某草草
某草草 2017-05-15 16:59:35
0
3
800

最近在用ionic做项目,遇到了一些疑问,在移动端如果想做类似的模糊查询功能,是让angular用过滤器完成还是让后台写接口调用比较好? 功能就是有大量数据组成的列表,上面有个输入框,输入任意字符串则过滤出匹配的数据信息 ​

某草草
某草草

reply all(3)
漂亮男人

If the amount of data is not large, such as country list, city list and other fuzzy queries in cascading menus, Angular can be used to do it. After the data is obtained from the background, it is all saved in memory or local storage, and Angular can filter it by itself.
If the amount of data is large, such as bank statements, the list displayed on the front end itself uses background paging technology, then the only way is to return the fuzzy query results to the front end after back-end query.

So which method to use depends on the business scenario.

大家讲道理

You must first consider how large the amount of data you are querying is, whether the client can save it completely, and whether the client can accept the time-consuming downloading of the entire data.

After all, it is better to do filtering on the client side than to request the server every time.

洪涛

Dynamic data backend Static data frontend

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!