- About
- Installation
- Usage
- Sample template
- Block parameters
- Properties
- Development
- Link
ember-cli-filter-component
to your project - Running tests
- Link
ember-cli-filter-component provides a {{filter-content}}
block component for filtering arrays of items.
- Live example - external link
- Sample code - available in EXAMPLES.md
- Changelog - available in CHANGELOG.md
cd /path/to/projects/cool-project
ember install ember-cli-filter-component
filtered {array}
- Description
Computed result of filtering items fromcontent
againstquery
- Note
Passed as the first block param to the component yield
query {string}
- Description
Value matched against items fromcontent
- Note
Passed as the second block param to the component yield
content (required) {array.<array, object>}
- Description
Items being checked for matches againstquery
properties (required) {string}
- Description
Properties on each item to filter- Space-delimited
- Enumerables are represented using
@each
- ex:
properties="title category.@each"
timeout {number}
- Description
Time in milliseconds to debounce applying the filter whencontent
,properties
, orquery
- Default:
420
query {string}
- Description
Value used to match against items fromcontent
To start developing/testing locally, clone the project to your machine.
cd /path/to/projects
git clone [email protected]:zakmac/ember-cli-filter-component.git
Once cloned, you can start editing and testing in the project folder itself, or include the addon in another project via npm link
.
# create an npm link from the project directory
cd /path/to/projects/ember-cli-filter-component
npm link
# include the npm link in your project
cd /path/to/projects/cool-project
npm link ember-cli-filter-component
The last step is to add "ember-cli-filter-component": ""
to the devDependencies
section of your project's package.json
.
Next time your project is run, the filter-content
component will be accessible.
The command ember test
will run the test suite via CLI, outputting results.
You can also run ember test --server
to launch a Test'em browser session.
This project is licensed under the MIT License.
For more information on using **ember-cli**, visit [http://www.ember-cli.com/](http://www.ember-cli.com/).
For more information on **Ember.js**, visit [http://www.emberjs.com/](http://www.emberjs.com/).