arturadib / agility

Javascript MVC for the "write less, do more" programmer
http://agilityjs.com
MIT License
542 stars 70 forks source link

Added binding of multiple attributes per tag ( 1-way binding tags only for now ) #33

Closed tristanls closed 13 years ago

tristanls commented 13 years ago

We had a need for setting multiple attributes and the tag value. For example:

This commit extends the data-bind functionality so that the above could be written as:

var op = $$( 
  { value: "special.format.value", label: "Special Format Label" },
  '<option data-bind="label, value value"></option>' );

note: the non-attribute data-bind needs to be first if it exists, rest is comma separated attribute variable pairs

I'd be happy to chat further.

Cheers!

tristanls commented 13 years ago

Found a bug, going to rework...

tristanls commented 13 years ago

Resubmitted as #34