Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Created October 25, 2016 10:24
Show Gist options
  • Save NetanelBasal/9c29eb272f3d28f640c26b2f3357e077 to your computer and use it in GitHub Desktop.
Save NetanelBasal/9c29eb272f3d28f640c26b2f3357e077 to your computer and use it in GitHub Desktop.
ngAfterContentInit() {
let buttonElement = this.renderer.createElement(this.nativeElement, "button");
this.renderer.createText(buttonElement, "Click me!");
this.renderer.setElementProperty(buttonElement, "disabled", true);
this.renderer.listen(buttonElement, "click", ( event ) => console.log(event));
this.renderer.setElementClass(buttonElement, "btn-large", true);
this.renderer.setElementStyle(buttonElement, "backgroundColor", "yellow");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment