Created
June 20, 2018 08:58
-
-
Save yjaaidi/c98c2e1d5bd408fa08dbf48b2a38f94e to your computer and use it in GitHub Desktop.
This file contains 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: 'wt-logo', | |
template: ` | |
<img [src]="getLogoUrl()"> | |
<button (click)="company = 'wishtack'">WISHTACK</button> | |
<button (click)="company = 'google'">GOOGLE</button> | |
` | |
}) | |
export class LogoComponent { | |
company: string; | |
getLogoUrl() { | |
return require(`!!url-loader!./${this.company}-logo.svg`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment