infinite-scroll-content.js 1.7KB

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