GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - walkerwzy/dynamicfilter: a angular directive that can dynamic add/remove filter conditions

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
js
js
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
data.json
data.json
 
 
demo.gif
demo.gif
 
 
index.html
index.html
 
 

Repository files navigation

dynamicfilter

demo

可以动态生成查询条件的angular组件, 比如"年龄=22, 爱好 不是 篮球"等, 数据源支持本地数组和远程数组.

a angular directive that can dynamic add/remove filter conditions.


  • define some modles that participate in construct a search query
  • include fieldid, fieldname, fieldtype, operator and datasource
  • different fieldtype can have different input element, e.g. enum type have a select element
  • some element can have remote datasource
  • every condition has 3 properities which stored in 3 hidden elements, backend request the form data to group these properities, then compose them as query to database

How to Use

set query models

//your query models
$scope.fall = [
    {
        fieldname:'enum field with obj array',
        field:'fdenum2',
        fieldtype:fieldType.enum,
        enumtype:'obj',
        enumkey:'key',
        enumval:'val',
        datasource:[{key:'key1',val:'val1'},{key:'key2',val:'val2'},{key:'key3',val:'val3'}] // or remote url
    }
]
//chosed query models
$scope.fuse = []

gen a button

<zkxfiltericon data="fall" out="fuse"></zkxfiltericon>

gen result fields

<zkxfilterbox data="fall" out="fuse"></zkxfilterbox>

run a web server

because the demo use absolutely url /root/to/file, so deploy a web server to run.


###License © 2014 GPL license

About

a angular directive that can dynamic add/remove filter conditions

Resources

Readme
GPL-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.