Skip to content

Instantly share code, notes, and snippets.

@YonathanMeguira
Last active December 24, 2018 13:01
Show Gist options
  • Save YonathanMeguira/6731ac46b371c955fadb5890dde1b4ab to your computer and use it in GitHub Desktop.
Save YonathanMeguira/6731ac46b371c955fadb5890dde1b4ab to your computer and use it in GitHub Desktop.
append element with renderer
for (let i = 0; i < 24; i++) {
const icon = (i < 7 || i > 18) ? "brightness_3" : "wb_sunny";
const elementToAppend = `<div><mat-icon svgIcon=${icon}></mat-icon></div>`;
this.renderer.appendChild(elementToAppend);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment