Source: ngx-imready/projects/ngx-imready/src/lib/ngx-imready.module.ts

  1. /* eslint-disable @typescript-eslint/no-empty-function */
  2. import { NgModule } from '@angular/core';
  3. import { NgxImReadyRegisterDirective } from './ngx-imready-register.directive';
  4. import { NgxImReadyDirective } from './ngx-imready.directive';
  5. /**
  6. * Angular directive to check if the images or videos are loaded.
  7. * @ko 이미지와 비디오들이 로드가 됐는지 체크하는 Angular directive.
  8. * @alias NgxImReady
  9. * @example
  10. ```html
  11. <div NgxImReady
  12. selector="img"
  13. (ready)="onReady($event)"
  14. (readyElement)="onReadyElement($event)"
  15. (error)="onError($event)">
  16. <p>isReady: <span id="isReady">{{isReady ? "I'm Ready" : "Loading..."}}</span></p>
  17. <p>progress: <span id="readyCount">{{readyCount}}</span> / <span id="totalCount">{{totalCount}}</span></p>
  18. <p>errors: <span id="readyCount">{{errorCount}}</span></p>
  19. <div class="images" NgxImReadyRegister>
  20. <img ... />
  21. <img ... />
  22. </div>
  23. </div>
  24. ```
  25. */
  26. @NgModule({
  27. declarations: [
  28. NgxImReadyDirective,
  29. NgxImReadyRegisterDirective,
  30. ],
  31. imports: [
  32. ],
  33. exports: [
  34. NgxImReadyDirective,
  35. NgxImReadyRegisterDirective,
  36. ],
  37. })
  38. export class NgxImreadyModule {
  39. }
comments powered by Disqus