Skip to content

Commit 7d92b75

Browse files
committed
init data list
1 parent 0f25e3f commit 7d92b75

File tree

2 files changed

+101
-6
lines changed

2 files changed

+101
-6
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
export interface IDataList {
2+
nameProduct: string;
3+
author: string;
4+
pictureProduct: string;
5+
category: string;
6+
price: number;
7+
}
8+
9+
export const LIST_DATA: IDataList[] = [
10+
{
11+
nameProduct: `Beneath a Scarlet Sky: A Novel`,
12+
author: 'Mark Sullivan',
13+
pictureProduct: '',
14+
category: 'Literature & Fiction',
15+
price: 5.99
16+
},
17+
{
18+
nameProduct: `The Orphan's Tale: A Novel`,
19+
author: 'Pam Jenoff',
20+
pictureProduct: 'Literature & Fiction',
21+
category: '',
22+
price: 10.37
23+
},
24+
{
25+
nameProduct: 'All the Light We Cannot See: A Novel',
26+
author: 'Anthony Doerr',
27+
pictureProduct: 'Literature & Fiction',
28+
category: '',
29+
price: 12.99
30+
},
31+
{
32+
nameProduct: 'Rules of Civility: A Novel',
33+
author: 'Rules of Civility: A Novel',
34+
pictureProduct: 'Literature & Fiction',
35+
category: '',
36+
price: 11.79
37+
},
38+
{
39+
nameProduct: 'The Glass Castle: A Memoir',
40+
author: 'Jeannette Walls',
41+
pictureProduct: '',
42+
category: 'Biographies & Memoirs',
43+
price: 5.14
44+
},
45+
{
46+
nameProduct: 'Born a Crime: Stories from a South African Childhood',
47+
author: 'Trevor Noah',
48+
pictureProduct: '',
49+
category: 'Biographies & Memoirs',
50+
price: 6.0
51+
},
52+
{
53+
nameProduct: 'Al Franken, Giant of the Senate',
54+
author: 'Al Franken',
55+
pictureProduct: '',
56+
category: 'Biographies & Memoirs',
57+
price: 6.39
58+
},
59+
{
60+
nameProduct: 'Pandemic (The Extinction Files Book 1)',
61+
author: 'A.G. Riddle',
62+
pictureProduct: '',
63+
category: 'Biographies & Memoirs',
64+
price: 5.47
65+
},
66+
{
67+
nameProduct: 'Origin: A Novel',
68+
author: 'Dan Brown',
69+
pictureProduct: '',
70+
category: 'Suspense',
71+
price: 10.99
72+
},
73+
{
74+
nameProduct: 'The Rooster Bar',
75+
author: 'John Grisham',
76+
pictureProduct: '',
77+
category: 'Suspense',
78+
price: 10.99
79+
},
80+
{
81+
nameProduct: 'The Life We Bury',
82+
author: 'Dan Brown',
83+
pictureProduct: '',
84+
category: 'Suspense',
85+
price: 10.99
86+
},
87+
{
88+
nameProduct: 'Origin: A Novel',
89+
author: 'Dan Brown',
90+
pictureProduct: '',
91+
category: 'Suspense',
92+
price: 10.99
93+
}
94+
];

src/pages/list/reactive-list-label/reactive-list-label.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
import { Component } from '@angular/core';
22
import { IonicPage, NavController, NavParams } from 'ionic-angular';
33

4-
/**
5-
* Generated class for the ReactiveListLabelPage page.
6-
*
7-
* See https://ionicframework.com/docs/components/#navigation for more info on
8-
* Ionic pages and navigation.
9-
*/
4+
import { LIST_DATA } from './list-data';
105

116
@IonicPage()
127
@Component({
@@ -15,9 +10,15 @@ import { IonicPage, NavController, NavParams } from 'ionic-angular';
1510
})
1611
export class ReactiveListLabelPage {
1712

13+
public dataList: IDataList = LIST_DATA;
14+
1815
constructor(public navCtrl: NavController, public navParams: NavParams) {
1916
}
2017

18+
private initDataList() {
19+
20+
}
21+
2122
ionViewDidLoad() {
2223
console.log('ionViewDidLoad ReactiveListLabelPage');
2324
}

0 commit comments

Comments
 (0)