Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main() {
- var element = query('#sample_container_id');
- appendComponentToElement(element, new CounterComponent() );
- }
- void appendComponentToElement(Element element, WebComponent component) {
- component.host = new DivElement();
- var lifecycleCaller = new ComponentItem(component)..create();
- element.append(component.host);
- lifecycleCaller.insert();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement