Skip to content

Instantly share code, notes, and snippets.

@mdmoin7
Created March 16, 2019 14:02
Show Gist options
  • Save mdmoin7/1225bcc9b79157c7bf7b6d3ec678a831 to your computer and use it in GitHub Desktop.
Save mdmoin7/1225bcc9b79157c7bf7b6d3ec678a831 to your computer and use it in GitHub Desktop.
import { Component, Input } from '@angular/core';
@Component({
selector: 'app-image-with-loading',
templateUrl: './image-with-loading.component.html',
styleUrls: ['./image-with-loading.component.css']
})
export class ImageWithLoadingComponent {
@Input() loader:string='https://media.tenor.com/images/f864cbf3ea7916572605edd3b3fe637f/tenor.gif';
@Input() height:number=200;
@Input() width:number=200;
@Input() image:string;
isLoading:boolean;
constructor() {
this.isLoading=true;
}
hideLoader(){
this.isLoading=false;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment