diff --git a/ionic/components/checkbox/checkbox.js b/ionic/components/checkbox/checkbox.js index 7b5f17f1cf..fd33c3c932 100644 --- a/ionic/components/checkbox/checkbox.js +++ b/ionic/components/checkbox/checkbox.js @@ -2,9 +2,9 @@ import {ElementRef, Renderer, EventEmitter, onChange} from 'angular2/angular2'; import {isPresent} from 'angular2/src/facade/lang'; import {setProperty} from 'angular2/src/forms/directives/shared' -import {Component, Directive} from 'angular2/angular2'; -import {Ancestor} from 'angular2/angular2'; -import {View} from 'angular2/angular2'; +import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations'; +import {Ancestor} from 'angular2/src/core/annotations_impl/visibility'; +import {View} from 'angular2/src/core/annotations_impl/view'; import {onInit} from 'angular2/angular2'; //pretty sure this has changed in the latest angular @@ -12,6 +12,7 @@ import {NgControl} from 'angular2/forms'; import {IonicComponent} from '../../config/component'; import {Icon} from '../icon/icon'; + @IonicComponent(Checkbox) @View({ template: ` diff --git a/ionic/config/component.js b/ionic/config/component.js index 8c6812ce9d..e4c498e7f6 100644 --- a/ionic/config/component.js +++ b/ionic/config/component.js @@ -1,24 +1,22 @@ -import {Component, ComponentAnnotation, Directive} from 'angular2/angular2'; +import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations'; import {DirectiveMetadata} from 'angular2/src/render/api'; import * as util from 'ionic/util'; import {Platform} from 'ionic/platform/platform'; import {GlobalIonicConfig} from '../components/app/app'; + export class IonicDirective extends Directive { constructor(ComponentType) { super( appendModeConfig(ComponentType) ); } } -export let IonicComponent = (function(){ - function IonicComponentFactory(ComponentClass) { - return new Component(appendModeConfig(ComponentClass)); +export class IonicComponent extends Component { + constructor(ComponentType) { + super( appendModeConfig(ComponentType) ); } - IonicComponentFactory.prototype = Object.create(ComponentAnnotation.prototype); - return IonicComponentFactory; -})(); - +} function appendModeConfig(ComponentType) { let config = ComponentType.config;