Angular style declarative Blaze html events

Guys, this s**t is cool. Writing blaze angular style is now possible. If you haven’t migrated to react yet, this is a awesome little package to clean up your html/js:

//template
.btn.btn-default(onclick="doSomething this.id currentUser 'foo'") Click me // <-- did I just pass in a object, global template helper, static string?

//js
Template.events({
    'doSomething': function(event, template, id, user, paramX) {
        // did I just declaratively CALL a function with onClick and PASS parameters into it from the template?
        // That was a rhetorical question, don't answer it. ;)
    }
});

It works, check it out!

2 Likes