Advertisement
Guest User

Untitled

a guest
Apr 19th, 2013
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement