You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
864 B
40 lines
864 B
import { Component, OnInit } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-list',
|
|
templateUrl: 'list.page.html',
|
|
styleUrls: ['list.page.scss']
|
|
})
|
|
export class ListPage implements OnInit {
|
|
private selectedItem: any;
|
|
private icons = [
|
|
'flask',
|
|
'wifi',
|
|
'beer',
|
|
'football',
|
|
'basketball',
|
|
'paper-plane',
|
|
'american-football',
|
|
'boat',
|
|
'bluetooth',
|
|
'build'
|
|
];
|
|
public items: Array<{ title: string; note: string; icon: string }> = [];
|
|
constructor() {
|
|
for (let i = 1; i < 11; i++) {
|
|
this.items.push({
|
|
title: 'Item ' + i,
|
|
note: 'This is item #' + i,
|
|
icon: this.icons[Math.floor(Math.random() * this.icons.length)]
|
|
});
|
|
}
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
// add back when alpha.4 is out
|
|
// navigate(item) {
|
|
// this.router.navigate(['/list', JSON.stringify(item)]);
|
|
// }
|
|
}
|