mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
Derpleton
This commit is contained in:
@ -1,16 +1,27 @@
|
|||||||
import {bootstrap} from 'angular2/angular2'
|
import {bootstrap} from 'angular2/angular2'
|
||||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||||
|
import {FormBuilder, Control, ControlGroup, Validators, formDirectives} from 'angular2/forms';
|
||||||
|
|
||||||
import {Nav, Slides, Slide, Content, Button, List, Item} from 'ionic/ionic';
|
import {Nav, Segment, SegmentButton, Slides, Slide, Content, Button, List, Item} from 'ionic/ionic';
|
||||||
|
|
||||||
@Component({ selector: 'ion-app' })
|
@Component({ selector: 'ion-app' })
|
||||||
@View({
|
@View({
|
||||||
templateUrl: 'main.html',
|
templateUrl: 'main.html',
|
||||||
directives: [Nav, Slides, Slide, Content, Button, List, Item]
|
directives: [formDirectives, Nav, Segment, SegmentButton, Slides, Slide, Content, Button, List, Item]
|
||||||
})
|
})
|
||||||
export class IonicApp {
|
export class IonicApp {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
|
||||||
|
this.filterForm = new ControlGroup({
|
||||||
|
filterControl: new Control("")
|
||||||
|
});
|
||||||
|
/*
|
||||||
|
var fb = new FormBuilder();
|
||||||
|
this.form = fb.group({
|
||||||
|
filter: ['new']
|
||||||
|
});
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,8 +25,15 @@
|
|||||||
<ion-view>
|
<ion-view>
|
||||||
|
|
||||||
<ion-toolbar id="p2toolbar">
|
<ion-toolbar id="p2toolbar">
|
||||||
<div class="toolbar-inner">
|
<div class="toolbar-inner" [control-group]="filterForm">
|
||||||
<ion-title>feed</ion-title>
|
<ion-segment control="filterControl">
|
||||||
|
<ion-segment-button value="new" ion-button>
|
||||||
|
New
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="best" ion-button>
|
||||||
|
Best
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
</div>
|
</div>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
@ -46,7 +53,7 @@
|
|||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
It is good to realize that if love and peace can prevail on earth, and if we can teach our children to honor nature's gifts, the joys and beauties of the outdoors will be here forever.
|
It is good to realize that if love and peace can prevail on earth, and if we can teach our children to honor nature's gifts, the joys and beauties of the outdoors will be here forever.
|
||||||
</div>
|
</div>
|
||||||
<img src="http://ionic-io-assets.s3.amazonaws.com/images/p.jpg">
|
<img src="http://ionic-io-assets.s3.amazonaws.com/images/p1.png">
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
Posted 6 days ago
|
Posted 6 days ago
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user