Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 19th, 2013  |  syntax: None  |  size: 0.36 KB  |  views: 44  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data