Last active
May 28, 2018 08:17
-
-
Save realtomaszkula/821084cb28d5304febe152ba3bbba229 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Directive({ | |
selector: 'img[appProgressiveImage]', | |
}) | |
export class ProgressiveImageDirective { | |
@HostBinding('attr.src') | |
@Input() src: string; | |
@HostBinding('style.width.px') | |
width: number; | |
@HostBinding('style.height.px') | |
height: number; | |
} | |
@Directive({ | |
selector: '[appProgressiveImageFallback]', | |
}) | |
export class ProgressiveImageFallbackDirective { | |
@HostBinding('style.width.px') | |
width: number; | |
@HostBinding('style.height.px') | |
height: number; | |
} | |
@Directive({ | |
selector: '[appProgressiveImagePlaceholder]', | |
}) | |
export class ProgressiveImagePlaceholderDirective { | |
@HostBinding('style.width.px') | |
width: number; | |
@HostBinding('style.height.px') | |
height: number; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment