Monday, May 5, 2014

Bringing some of the goodness of Angular.js to Knockout

I’ve been using Knockout for some time now, but more recently I started using Angular.js. And I have to admit it there are some really nice features in Angular that I would love to have in Knockout as well.

I was planning to write some extensions myself but then I discovered Knockout.Punches which introduces some enhanced binding syntax for Knockout.

One of the things I like in Angular is the concept of filters:

This will take the ‘name’ value from your bound ViewModel, returns only the first 20 characters and convert the result to uppercase.

And this is how you can do it using Knockout.Punches:

Have a look at the documentation for some of the other nice features it offers...

No comments: