Skip to content

Instantly share code, notes, and snippets.

@yjaaidi
Created June 20, 2018 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yjaaidi/c98c2e1d5bd408fa08dbf48b2a38f94e to your computer and use it in GitHub Desktop.
Save yjaaidi/c98c2e1d5bd408fa08dbf48b2a38f94e to your computer and use it in GitHub Desktop.
@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