component renamed to annotations

This commit is contained in:
Adam Bradley
2015-06-28 21:03:34 -05:00
parent ee3de8a03d
commit 71e893f069
15 changed files with 87 additions and 101 deletions

View File

@@ -1,9 +1,51 @@
import {coreDirectives} from 'angular2/angular2';
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {DirectiveMetadata} from 'angular2/src/render/api';
import {View} from 'angular2/src/core/annotations_impl/view';
import * as util from 'ionic/util';
import {Platform} from 'ionic/platform/platform';
import {GlobalIonicConfig} from '../components/app/app';
import {
Aside, Content, Refresher,
Slides, Slide, SlidePager,
Tabs, Tab,
List, Item,
Icon,
Checkbox, Switch, Label, Input,
Segment, SegmentButton, SegmentControlValueAccessor,
RadioGroup, RadioButton, SearchBar,
Nav, NavbarTemplate, Navbar, NavPush, NavPop
} from 'ionic/ionic';
export class IonicView extends View {
constructor(config) {
let directives = [
// Angular
coreDirectives,
// Content
Aside, Content, Refresher,
List, Item,
Slides, Slide, SlidePager,
Tabs, Tab,
// Media
Icon,
// Form elements
Segment, SegmentButton, SegmentControlValueAccessor,
//Checkbox, Switch, Label, Input
//RadioGroup, RadioButton, SearchBar,
// Nav
Nav, NavbarTemplate, Navbar, NavPush, NavPop
];
config.directives = (config.directives || []).concat(directives);
super(config);
}
}
export class IonicDirective extends Directive {
@@ -19,6 +61,10 @@ export class IonicComponent extends Component {
}
function appendModeConfig(ComponentType) {
if (typeof ComponentType === 'object') {
return ComponentType;
}
let config = ComponentType.config;
config.host = config.host || {};

View File

@@ -1,45 +0,0 @@
import {coreDirectives} from 'angular2/angular2';
import {View} from 'angular2/src/core/annotations_impl/view';
import {
Aside, Content, Refresher,
Slides, Slide, SlidePager,
Tabs, Tab,
List, Item,
Icon,
Checkbox, Switch, Label, Input, Segment, SegmentButton, SegmentControlValueAccessor,
RadioGroup, RadioButton, SearchBar,
Nav, NavbarTemplate, Navbar, NavPush, NavPop
} from 'ionic/ionic';
export class IonicView extends View {
constructor(config) {
let directives = [
// Angular
coreDirectives,
// Content
Aside, Content, Refresher,
List, Item,
Slides, Slide, SlidePager,
Tabs, Tab,
// Media
Icon,
// Form elements
Segment, SegmentButton, SegmentControlValueAccessor,
//Checkbox, Switch, Label, Input
//RadioGroup, RadioButton, SearchBar,
// Nav
Nav, NavbarTemplate, Navbar, NavPush, NavPop
];
config.directives = (config.directives || []).concat(directives);
super(config);
}
}