Created
June 11, 2018 08:17
-
-
Save realtomaszkula/cd6443c6e104b67fd2d0398689a34bbf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-root', | |
template: `<app-card></app-card>`, | |
}) | |
export class AppComponent { | |
// ... | |
randomTheme(): Theme { | |
const primary = this.randomHex(); | |
const accent = this.randomHex(); | |
return { primary, accent }; | |
} | |
private randomHex() { | |
return '#' + Math.floor(Math.random() * 16777215).toString(16); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment