UPDATE: Meteor 1.2 launched with official support for Angular. It’s also clear that Meteor’s Blaze UI layer isn’t being pushed forward as fast as other UI libraries. In that case, Angular may be a good fit for your app. As always, YMMV.

There’s been a lot of chatter lately on Crater.io and the Meteor Google Groups about combining Angular and Meteor.

I too have found Meteor’s UI features lacking from time to time, or have wanted to use any of the great libraries built on top of Angular like Ionic.

Blaze: Meteor’s Angular

While exploring the new Meteor.com site I found this description of the Blaze package to be particularly interesting:

Meteor Blaze is a powerful library for creating live-updating user interfaces. Blaze fulfills the same purpose as Angular, Backbone, Ember, React, Polymer, or Knockout, but is much easier to use.

A pretty bold statement. I had personally never thought of Blaze that way, but once I did I started looking at my Meteor code quite a bit differently.

Component-driven Development in Meteor

I recently attempted to port Ionic’s Angular integration over to Meteor. It’s still very much a work in progress, and I’d love some help (seriously…I have no idea what I’m doing ☺), but I’ve already learned a lot about Blaze, and it made me realize how many similarities Blaze’s Templates have to Angular’s Directives.

Templates as Directives

Just like Angular’s directives (and to a lesser extent web components), Blaze’s templates can be used as self-contained, reusable components. Take this Angular directive from Ionic:

<ion-checkbox ng-model="isChecked">Checkbox Label</ion-checkbox>

You can see the underlying Angular implementation here. Now here’s how the same component would look in a Meteor Template:

{{#ionCheckbox model=isChecked}}Checkbox Label{{/ionCheckbox}}

…and it’s underlying Blaze implementation. As you can see, not only is it possible to implement the same component in Blaze, I’d argue the code is much cleaner and easier to understand (no esoteric `restrict: ‘E’` or `transclude: true` magic, for instance). Here’s a demo of the checkbox in action.

What is Blaze Missing?

I’m still discovering all that Blaze has to offer, but I will say that the main thing it lacks is polish. A lot of features are still undocumented and some tasks are awkward to implement or require custom solutions. I may be wrong, but I get the feeling that all the necessary pieces are in place, they just need to be put together.

The Future of Blaze

Blaze still has a ways to go before it is as robust as Angular or Ember, but I’m confident it will get there. The Blaze README has an entire section on their future plans. This quote is particularly relevant:

Blaze will get better patterns for creating reusable UI components. Templates already serve as reusable components, to a point.

I think it would be great to see the Meteor community try to push the boundaries of Blaze and give the Meteor developers feedback, rather than try to replace Blaze with Angular or other frameworks.

And here’s hoping we’ll see some big improvements to Blaze in Meteor 1.1 ☺