SHARE
TWEET

Untitled

a guest Apr 19th, 2013 54 Never
  1. void main() {
  2.   var element = query('#sample_container_id');
  3.   appendComponentToElement(element, new CounterComponent() );
  4. }
  5.  
  6. void appendComponentToElement(Element element, WebComponent component) {
  7.   component.host = new DivElement();
  8.   var lifecycleCaller = new ComponentItem(component)..create();
  9.   element.append(component.host);
  10.   lifecycleCaller.insert();
  11. }
RAW Paste Data
Top