dburles:iron-router-query-array

v1.0.1Published 9 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Iron Router Query Array

An addon package for Iron Router that allows easy control of query string arrays.

Installation

$ meteor add dburles:iron-router-query-array

API

add(name, value);

1Router.query.add('foo', 1);
2// http://example.com/?foo[]=1
3Router.query.add('foo', 2);
4// http://example.com/?foo[]=1&foo[]=2

remove(name, value);

1Router.query.remove('foo', 1);
2// http://example.com/?foo[]=2

isSet(name, value);

1Router.query.isSet('foo', 2);
2// true

clear();

1Router.query.clear();
2// http://example.com/

Example Application

Demo: http://query-array-demo.meteor.com

Source: https://github.com/dburles/query-array-demo

License

MIT