Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
selector: 'my-app',
template: `
<div [ngClass]="theme">
<div>Themes implemented</div> <br/><br/>
Select Theme : <a href="#" (click)="setTheme('light')">Light </a> |
<a href="#" (click)="setTheme('dark')">Dark</a> |
<a href="#" (click)="setTheme('')">No theme</a><br/><br/>
<p> <b>Current Theme : </b> {{ theme || 'none' }} </p>
<custom-input [placeholder]="'Your name ...'" ></custom-input> <br/>
<custom-button [text]="'Sign In'" [state]="'primary'" ></custom-button>
export class App {
theme = ''; // No initial theme set
constructor() { = `Themeable Components - Part 2 - Angular! v${VERSION.full}`
this.theme = theme;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.