Skip to content

0.2.1 interface IAttributes

Ivan S Glazunov edited this page Feb 20, 2015 · 2 revisions

interface IAttributes { [name: string]: TData; };

Describes the interface to the tag attributes.

  • Hash with TData.
  • Supports only the first level of nesting.
var el = Templates.doubles.div()();
el._attributes = { class: "container center", 'data-src': "#element" };
el.render(console.log);
<div class="container center" data-src="#element"></div>
Clone this wiki locally