GitXplorerGitXplorer
k

angular-filter-suspend

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
938d11e88a951015bab778e7e0b093538b8ebd82

chore(README): add note about suspended return

kkasperlewau committed 10 years ago
Unverified
44c8109d5290f4472daafd1bf4b9eb36e07046d7

feat(initial): release v0.0.1

kkasperlewau committed 10 years ago

README

The README file for this repository.

angular-filter-suspend travisci

adds an additional 'suspend' parameter to built-in angular filters

/** where suspend is a boolean, true|false **/
filter(args, suspend[true|false]);

{{ filter:arg:arg:suspend[true|false] }}

installation

  bower install angular-filter-suspend --save

usage

Note: The return value of a filter that was initially suspended would be the first value passed to said filter. This differs to some extent from what the native return values are. Check the angular docs for a reference point.

If however the filter was not suspended initially, but at a later point in time it was - the last state of the un-suspended filter would be the returned value.


  angular.module('yourModule', [ 'angular.filter.suspend' ]);
  /**
   * in .js land
   */
  numberFilter(number, fraction, suspend);
  dateFilter(date, format, timezone, suspend);
  jsonFilter(json, spacing, suspend);
  lowercaseFilter(lowercase, suspend);
  limitToFilter(limitTo, limit, begin, suspend);
  orderByFilter(orderBy, expression, reverse, suspend);
  filterFilter(filter, expression, comparator, suspend);
  <!-- in .html land -->
  {{ number_expression | number : fractionSize : suspend }}
  {{ date_expression | date : format : timezone : suspend }}
  {{ json_expression | json : spacing : suspend }}
  {{ lowercase_expression | lowercase : suspend }}
  {{ limitTo_expression | limitTo : limit : begin : suspend }}
  {{ orderBy_expression | orderBy : expression : reverse : suspend }}
  {{ filter_expression | filter : expression : comparator : suspend }}

testing

npm install; npm test

license

MIT © Kasper Lewau