From add20aca9ceb4fc30b1cc4a64f4eb7960483a87a Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 1 Jun 2015 16:33:49 -0500 Subject: [PATCH] Default platform to ios --- ionic/components/form/test/basic/index.js | 6 +++--- ionic/components/segment/test/basic/index.js | 8 +++++--- ionic/platform/platform.js | 8 ++++++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ionic/components/form/test/basic/index.js b/ionic/components/form/test/basic/index.js index 3f1f496375..b79def5e9f 100644 --- a/ionic/components/form/test/basic/index.js +++ b/ionic/components/form/test/basic/index.js @@ -2,16 +2,16 @@ import {bootstrap} from 'angular2/angular2' import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations'; 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 {IONIC_DIRECTIVES} from 'ionic/ionic' -console.log([FormDirectives].concat(IONIC_DIRECTIVES)); +console.log([formDirectives].concat(IONIC_DIRECTIVES)); @Component({ selector: 'ion-app' }) @View({ templateUrl: 'main.html', - directives: [FormDirectives].concat(IONIC_DIRECTIVES) + directives: [formDirectives].concat(IONIC_DIRECTIVES) }) class IonicApp { constructor() { diff --git a/ionic/components/segment/test/basic/index.js b/ionic/components/segment/test/basic/index.js index e4063aa359..481278d3a7 100644 --- a/ionic/components/segment/test/basic/index.js +++ b/ionic/components/segment/test/basic/index.js @@ -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 {View} from 'angular2/src/core/annotations_impl/view'; 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' +console.log('Loaded', formDirectives, Segment, SegmentButton, Content, Button, NgSwitch, NgSwitchWhen); + @Component({ selector: 'ion-app' }) @View({ templateUrl: 'main.html', - directives: [FormDirectives].concat([Segment, SegmentButton, Content, Button, Switch, SwitchWhen]) + directives: [formDirectives].concat([Segment, SegmentButton, Content, Button, NgSwitch, NgSwitchWhen]) }) class IonicApp { constructor() { diff --git a/ionic/platform/platform.js b/ionic/platform/platform.js index c0ffdf63ee..5e2fecc3d0 100644 --- a/ionic/platform/platform.js +++ b/ionic/platform/platform.js @@ -32,6 +32,10 @@ class PlatformController { registry[platform.name] = platform; } + getPlatform(name) { + return registry[name]; + } + set(platform) { activePlatform = platform; @@ -92,7 +96,7 @@ Platform.register({ // Last case is a catch-all Platform.setDefault({ - name: 'core' + name: 'ios' }); -Platform.set( Platform.detect() ); +Platform.set( Platform.get('ios') );//Platform.detect() );