mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
Default platform to ios
This commit is contained in:
@ -2,16 +2,16 @@ 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, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||||
//import {Button, Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic';
|
//import {Button, Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic';
|
||||||
import {IONIC_DIRECTIVES} from 'ionic/ionic'
|
import {IONIC_DIRECTIVES} from 'ionic/ionic'
|
||||||
|
|
||||||
console.log([FormDirectives].concat(IONIC_DIRECTIVES));
|
console.log([formDirectives].concat(IONIC_DIRECTIVES));
|
||||||
|
|
||||||
@Component({ selector: 'ion-app' })
|
@Component({ selector: 'ion-app' })
|
||||||
@View({
|
@View({
|
||||||
templateUrl: 'main.html',
|
templateUrl: 'main.html',
|
||||||
directives: [FormDirectives].concat(IONIC_DIRECTIVES)
|
directives: [formDirectives].concat(IONIC_DIRECTIVES)
|
||||||
})
|
})
|
||||||
class IonicApp {
|
class IonicApp {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
import {bootstrap, Switch, SwitchWhen} from 'angular2/angular2'
|
import {bootstrap, NgSwitch, NgSwitchWhen} 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 {Segment, SegmentButton, Content, Button} from 'ionic/ionic';
|
import {Segment, SegmentButton, Content, Button} from 'ionic/ionic';
|
||||||
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||||
//import {IONIC_DIRECTIVES} from 'ionic/ionic'
|
//import {IONIC_DIRECTIVES} from 'ionic/ionic'
|
||||||
|
|
||||||
|
console.log('Loaded', formDirectives, Segment, SegmentButton, Content, Button, NgSwitch, NgSwitchWhen);
|
||||||
|
|
||||||
@Component({ selector: 'ion-app' })
|
@Component({ selector: 'ion-app' })
|
||||||
@View({
|
@View({
|
||||||
templateUrl: 'main.html',
|
templateUrl: 'main.html',
|
||||||
directives: [FormDirectives].concat([Segment, SegmentButton, Content, Button, Switch, SwitchWhen])
|
directives: [formDirectives].concat([Segment, SegmentButton, Content, Button, NgSwitch, NgSwitchWhen])
|
||||||
})
|
})
|
||||||
class IonicApp {
|
class IonicApp {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -32,6 +32,10 @@ class PlatformController {
|
|||||||
registry[platform.name] = platform;
|
registry[platform.name] = platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPlatform(name) {
|
||||||
|
return registry[name];
|
||||||
|
}
|
||||||
|
|
||||||
set(platform) {
|
set(platform) {
|
||||||
activePlatform = platform;
|
activePlatform = platform;
|
||||||
|
|
||||||
@ -92,7 +96,7 @@ Platform.register({
|
|||||||
|
|
||||||
// Last case is a catch-all
|
// Last case is a catch-all
|
||||||
Platform.setDefault({
|
Platform.setDefault({
|
||||||
name: 'core'
|
name: 'ios'
|
||||||
});
|
});
|
||||||
|
|
||||||
Platform.set( Platform.detect() );
|
Platform.set( Platform.get('ios') );//Platform.detect() );
|
||||||
|
Reference in New Issue
Block a user