product-list.ts 676 B

12345678910111213141516171819202122232425262728
  1. import { Component } from '@angular/core';
  2. import { NavController } from 'ionic-angular';
  3. import { DefaultListable } from '../../defaults/default-listable';
  4. import { Product } from '../../models/product';
  5. @Component({
  6. selector: 'page-product-list',
  7. templateUrl: 'product-list.html'
  8. })
  9. export class ProductListPage extends DefaultListable<Product> {
  10. constructor(public navCtrl: NavController) {
  11. super();
  12. this.init();
  13. }
  14. init(): void {
  15. for (let i = 0; i < 100; i++) {
  16. this.add(new Product(i + 1, 'Product' + (i + 1), ''));
  17. }
  18. }
  19. ionViewDidLoad() {
  20. console.log('Hello ProductList Page');
  21. }
  22. }