按数据库表中的字段过滤

编程入门 行业动态 更新时间:2024-10-28 09:26:33
本文介绍了按数据库表中的字段过滤---- angularjs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有人请帮助我理解如何从表格中响应的数据创建新对象。我需要通过已经由另一个字段分组的字段构建过滤器。例如,数据已经按类别字段分组,现在对于每个类别,我需要显示它具有的文档文件的类型。我还需要构建一个函数来调用此字段或索引点击吗? 我得到了以下结构但不知道它是如何工作的,目前它是由不同的字段过滤: 我尝试过: < ling在typeObj中重复输入[category.category] ​​.subcategories ng-click =show(subcategory,category)> typeObj: 类别:{[类别:{a},类别:{b},类别:{c}} ... $ scope.show(子类别,类别){ $ scope.listOfDocuments = $ scope.typeObj(subcategory,id);}

Does somebody please help me understand how a new object can be created from data responded from a table. I need to build a filter by a field that is already grouped by another one. For example, the data is already grouped by the "category" field and now for each category I need to show the "types" of document files it has. I will also need to build a function to call on click by this field or index? I got the following structure but do not how it is working, currently it is filtering by a different field: What I have tried: <li ng repeat type in typeObj[category.category].subcategories ng-click="show(subcategory, category)> typeObj: categories:{[category:{"a"}, category:{"b"}, category:{"c"}}... $scope.show(subcategory, category){ $scope.listOfDocuments=$scope.typeObj(subcategory, id);}

推荐答案

scope.show(子类别,类别){ scope.show(subcategory, category){

scope.listOfDocuments = scope.listOfDocuments=

scope.typeObj(subcategory,id);} scope.typeObj(subcategory, id);}

更多推荐

按数据库表中的字段过滤

本文发布于:2023-10-22 08:49:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1517029.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字段   数据库

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!