I want to declare my bindings as with AngularJS, but I'm using the KnockoutJS library. That is, I want to use Knockout but with the syntax I know from Angular. E.g.:
Today's message is: <span data-bind="visible:true,text:myMessage"></span>
I want to write using {{}}
notation, like so:
Today's message is: <span {{visible:true,text:myMessage}}></span>
How can I replace data-bind
attributes with {{}}
based syntax in KnockoutJS?
http://mbest.github.io/knockout.punches/ is all you need.
Knockout Punches convert traditional KO syntax to something like AngularJS
<div>Hello {{name}}.</div>
I personally find it very easy to use.