Derpleton

This commit is contained in:
Max Lynch
2015-06-08 18:09:40 -05:00
parent f0cab6eea4
commit 7a46b2ff96
2 changed files with 23 additions and 5 deletions

View File

@ -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']
});
*/
} }
} }

View File

@ -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>