mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Search bar cleanup
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import {bootstrap} from 'angular2/angular2'
|
||||
import {bootstrap, Switch, SwitchWhen} from 'angular2/angular2'
|
||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/fo
|
||||
@Component({ selector: 'ion-app' })
|
||||
@View({
|
||||
templateUrl: 'main.html',
|
||||
directives: [FormDirectives].concat([Segment, SegmentButton, Content, Button])
|
||||
directives: [FormDirectives].concat([Segment, SegmentButton, Content, Button, Switch, SwitchWhen])
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
|
||||
@@ -30,4 +30,16 @@
|
||||
</form>
|
||||
|
||||
Map mode: <b>{{form.controls.mapStyle.value}}</b>
|
||||
|
||||
<div [switch]="form.controls.mapStyle.value">
|
||||
<div *switch-when="'standard'">
|
||||
<h2>Standard</h2>
|
||||
</div>
|
||||
<div *switch-when="'hybrid'">
|
||||
<h2>Hybrid</h2>
|
||||
</div>
|
||||
<div *switch-when="'sat'">
|
||||
<h2>Satellite!!</h2>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user