Files
Brandy Carney 5119b57496 docs(segment): clean up docs on segment, update demo
the demo has been changed to show multiple segments in use, instead of
a lot of segments thrown on the page.

fixes driftyco/ionic-site#658
2016-06-29 17:16:02 -04:00

98 lines
1.4 KiB
TypeScript

import { Component } from '@angular/core';
import { ionicBootstrap } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
class ApiDemoPage {
appType = "Paid";
safari = "Shared Links";
weather = "sunny";
apps = {
"Paid": [
{
name: 'Monopoly',
price: '$0.99'
},
{
name: 'Angry Birds',
price: '$2.99'
}
],
"Free": [
{
name: 'Snapchat',
price: 'GET'
},
{
name: 'Instagram',
price: 'OPEN'
}
],
"Top": [
{
name: 'Spotify',
price: 'OPEN'
},
{
name: 'Pandora',
price: 'GET'
}
]
};
items = {
"Bookmarks": [
{
name: 'Favorites',
icon: 'ios-star-outline'
},
{
name: 'History',
icon: 'ios-clock-outline'
}
],
"Reading List": [
{
name: 'Terms of Service',
icon: 'create'
},
{
name: 'User Guide',
icon: 'book'
}
],
"Shared Links": [
{
name: 'Ionic Framework',
icon: 'ionic'
},
{
name: 'Learn Angular',
icon: 'logo-angular'
}
]
};
getItems(type) {
return this.apps[type];
}
getSafariItems(type) {
return this.items[type];
}
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
class ApiDemoApp {
root = ApiDemoPage;
}
ionicBootstrap(ApiDemoApp);