@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