mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00

- add spacing between imports - alphabetize imports - removed app.html files in favor of an inline ion-nav - cleaned up config demo so it uses proper syntax - use file name main.html for the first page for the demo - name the app ApiDemoApp and first page ApiDemoPage - replace the ion-toolbars with ion-navbars closes #7019 closes driftyco/ionic-site#647
58 lines
1.0 KiB
TypeScript
58 lines
1.0 KiB
TypeScript
import { Component } from '@angular/core';
|
|
|
|
import { ionicBootstrap } from 'ionic-angular';
|
|
|
|
|
|
@Component({
|
|
templateUrl: 'main.html'
|
|
})
|
|
class ApiDemoPage {
|
|
gender: string;
|
|
gaming: string;
|
|
toppings: Array<string>;
|
|
petAlertOpts;
|
|
petData;
|
|
pets: Array<string>;
|
|
notifications: string = 'mute_1';
|
|
rating: number = 2;
|
|
|
|
constructor() {
|
|
this.gender = 'f';
|
|
this.gaming = 'n64';
|
|
|
|
this.petAlertOpts = {
|
|
title: 'Like Pets?',
|
|
subTitle: 'Select your favorite'
|
|
};
|
|
|
|
this.toppings = ['bacon', 'xcheese'];
|
|
|
|
this.petData = [
|
|
{ text: 'Bird', value: 'bird' },
|
|
{ text: 'Cat', value: 'cat' },
|
|
{ text: 'Dog', value: 'dog' },
|
|
{ text: 'Honey Badger', value: 'honeybadger' },
|
|
];
|
|
|
|
this.pets = ['cat', 'dog'];
|
|
}
|
|
|
|
monthChange(val) {
|
|
console.log('Month Change:', val);
|
|
}
|
|
|
|
yearChange(val) {
|
|
console.log('Year Change:', val);
|
|
}
|
|
}
|
|
|
|
|
|
@Component({
|
|
template: '<ion-nav [root]="root"></ion-nav>'
|
|
})
|
|
class ApiDemoApp {
|
|
root = ApiDemoPage;
|
|
}
|
|
|
|
ionicBootstrap(ApiDemoApp);
|