infinite-scroll-content.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import { Component, Input, ViewEncapsulation } from '@angular/core';
  2. import { Config } from '../../config/config';
  3. import { InfiniteScroll } from './infinite-scroll';
  4. /**
  5. * @hidden
  6. */
  7. export class InfiniteScrollContent {
  8. constructor(inf, _config) {
  9. this.inf = inf;
  10. this._config = _config;
  11. }
  12. /**
  13. * @hidden
  14. */
  15. ngOnInit() {
  16. if (!this.loadingSpinner) {
  17. this.loadingSpinner = this._config.get('infiniteLoadingSpinner', this._config.get('spinner', 'ios'));
  18. }
  19. }
  20. }
  21. InfiniteScrollContent.decorators = [
  22. { type: Component, args: [{
  23. selector: 'ion-infinite-scroll-content',
  24. template: '<div class="infinite-loading">' +
  25. '<div class="infinite-loading-spinner" *ngIf="loadingSpinner">' +
  26. '<ion-spinner [name]="loadingSpinner"></ion-spinner>' +
  27. '</div>' +
  28. '<div class="infinite-loading-text" [innerHTML]="loadingText" *ngIf="loadingText"></div>' +
  29. '</div>',
  30. host: {
  31. '[attr.state]': 'inf.state'
  32. },
  33. encapsulation: ViewEncapsulation.None,
  34. },] },
  35. ];
  36. /** @nocollapse */
  37. InfiniteScrollContent.ctorParameters = () => [
  38. { type: InfiniteScroll, },
  39. { type: Config, },
  40. ];
  41. InfiniteScrollContent.propDecorators = {
  42. 'loadingSpinner': [{ type: Input },],
  43. 'loadingText': [{ type: Input },],
  44. };
  45. //# sourceMappingURL=infinite-scroll-content.js.map