Angular type filter

I’ve been dabbling in angular for a while and I’m wondering how to do things in meteor / Blaze. I’m specifically talking about the angular “filter”. See here for example on what I would like to achieve with meteor / Blaze.

Can someome show me how this is done in meteor/blaze?

Hi gsuz,

I’m new to meteor, but this is done with Helpers in meteor. E.g.

  statusClass: function(status) {
    if (status.idle) return 'info';
    if ( return 'success';
    return 'warning';
  statusText: function(status) {
    if (status.idle) return 'Idle';
    if ( return 'Online';
    return 'Offline';

Note that helpers are only available in templates. If you want to reuse them in “events” you can define your own Helpers class and link them in.

// These are available in events
Helpers = Helpers || {};
Helpers.myTemplate = {
  showStep: function(nextStep) {
    // do a thing
  when: function(when) {
    return Session.get('when');
  what: function() {
    return Session.get('what');

// These are available only in templates
  when: Helpers.myTemplate.when,
  what: Helpers.myTemplate.what,
  error: function() {
    return Template.instance().error.get();

// These are the events{
  'click .step-button-prev': function(e, template) {
  'click .step-button-next': function(e, template) {

Angular is a bit fascist about the global namespace. Meteor is a bit cowboy.

There may be a better way, but that’s where I started :smile:

Good luck!

@michaelcole I’m not sure we’ve understood each other correctly. I’m looking for a filter on-the-fly solution for meteor similar to the one in AngularJS.

I’ve made the following MeteorPad to better explain what I’m trying to accomplish. I want the list of clients to be filtered as soon as I start typing into the filter: search box.


Hey @gsuz, try the book, or the Todo App Tutorial. I think one or both show how to do client-side filtering.