Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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
You can’t perform that action at this time.