mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
rename IonicComponent stuff
This commit is contained in:
@ -14,12 +14,12 @@ import {IonicRoot} from '../app/app';
|
||||
import * as util from 'ionic/util';
|
||||
|
||||
import {Overlay} from '../overlay/overlay';
|
||||
import {IonicComponentNEW} from '../../config/component';
|
||||
import {IonicComponent} from '../../config/component';
|
||||
import {Animation} from 'ionic/animations/animation';
|
||||
import {ClickBlock} from '../../util/click-block';
|
||||
|
||||
|
||||
@IonicComponentNEW(ActionMenu)
|
||||
@IonicComponent(ActionMenu)
|
||||
@View({
|
||||
template: `
|
||||
<div class="action-menu-backdrop" (click)="cancel()"></div>
|
||||
|
@ -6,7 +6,7 @@ import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
import * as types from 'ionic/components/aside/extensions/types'
|
||||
import * as gestures from 'ionic/components/aside/extensions/gestures'
|
||||
import {dom} from 'ionic/util'
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
/**
|
||||
* TODO (?) add docs about how to have a root aside and a nested aside, then hide the root one
|
||||
@ -97,7 +97,7 @@ export class Aside {
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(Aside, {
|
||||
new IonicComponent_OLD(Aside, {
|
||||
properties: {
|
||||
side: {
|
||||
value: 'left'
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { ElementRef} from 'angular2/angular2'
|
||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
|
||||
@Directive({
|
||||
selector: 'button, ion-button, [ion-button],.button',
|
||||
@ -9,13 +10,12 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
export class Button {
|
||||
constructor(
|
||||
elementRef: ElementRef
|
||||
//@NgElement() ngElement:NgElement
|
||||
) {
|
||||
this.domElement = elementRef.domElement;
|
||||
this.config = Button.config.invoke(this);
|
||||
}
|
||||
}
|
||||
new IonicComponent(Button, {
|
||||
new IonicComponent_OLD(Button, {
|
||||
enhanceRawElement: true,
|
||||
propClasses: ['primary', 'secondary', 'danger', 'light', 'stable', 'dark', 'block', 'clear', 'full', 'icon']
|
||||
})
|
||||
|
@ -5,10 +5,10 @@ import {Ancestor} from 'angular2/src/core/annotations_impl/visibility';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
//import {ControlGroup, ControlDirective} from 'angular2/forms';
|
||||
import {IonicComponentNEW} from '../../config/component';
|
||||
import {IonicComponent} from '../../config/component';
|
||||
|
||||
|
||||
@IonicComponentNEW(Checkbox)
|
||||
@IonicComponent(Checkbox)
|
||||
@View({
|
||||
template: `
|
||||
<div class="item-media media-checkbox">
|
||||
|
@ -3,7 +3,7 @@ import {Component, Directive} from 'angular2/src/core/annotations_impl/annotatio
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {dom} from 'ionic/util'
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
import {
|
||||
ItemPrimaryOptions, ItemSecondaryOptions
|
||||
@ -60,7 +60,7 @@ export class Item {
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(Item, {
|
||||
new IonicComponent_OLD(Item, {
|
||||
propClasses: ['full']
|
||||
})
|
||||
|
||||
|
@ -2,7 +2,7 @@ import {Renderer, ElementRef} from 'angular2/angular2'
|
||||
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
import {ListVirtualScroll} from './virtual'
|
||||
|
||||
import * as util from 'ionic/util';
|
||||
@ -49,6 +49,6 @@ export class List {
|
||||
this.itemTemplate = item;
|
||||
}
|
||||
}
|
||||
new IonicComponent(List, {
|
||||
new IonicComponent_OLD(List, {
|
||||
propClasses: ['inset']
|
||||
})
|
||||
|
@ -6,7 +6,7 @@ import {Parent, Ancestor} from 'angular2/src/core/annotations_impl/visibility';
|
||||
|
||||
import {Content, List, Item, Button, Modal, ModalRef} from 'ionic/ionic';
|
||||
|
||||
import {Nav, IonicComponentNEW} from 'ionic/ionic';
|
||||
import {Nav, IonicComponent} from 'ionic/ionic';
|
||||
import {NavController, NavParams, NavbarTemplate, Navbar} from 'ionic/ionic';
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ export default class IonicApp {
|
||||
}
|
||||
}
|
||||
|
||||
@IonicComponentNEW(Modal)
|
||||
@IonicComponent(Modal)
|
||||
@View({
|
||||
template: '<ion-nav [initial]="initial"></ion-nav>',
|
||||
directives: [Nav, Button, Content]
|
||||
|
@ -7,7 +7,7 @@ import {bind} from 'angular2/di';
|
||||
|
||||
import {ViewController} from '../view/view-controller';
|
||||
import {SwipeHandle} from './swipe-handle';
|
||||
import {IonicComponentNEW} from '../../config/component';
|
||||
import {IonicComponent} from '../../config/component';
|
||||
|
||||
|
||||
export class PaneController {
|
||||
@ -87,7 +87,7 @@ export class PaneController {
|
||||
|
||||
}
|
||||
|
||||
@IonicComponentNEW(Pane)
|
||||
@IonicComponent(Pane)
|
||||
@View({
|
||||
template: `
|
||||
<template pane-anchor></template>
|
||||
|
@ -4,7 +4,7 @@ import {Ancestor} from 'angular2/src/core/annotations_impl/visibility';
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
//import {ControlGroup, ControlDirective} from 'angular2/forms'
|
||||
import {IonicDirective, IonicComponentNEW} from 'ionic/config/component';
|
||||
import {IonicDirective, IonicComponent} from 'ionic/config/component';
|
||||
|
||||
|
||||
@IonicDirective(RadioGroup)
|
||||
@ -87,7 +87,7 @@ export class RadioGroup {
|
||||
}
|
||||
|
||||
|
||||
@IonicComponentNEW(RadioButton)
|
||||
@IonicComponent(RadioButton)
|
||||
@View({
|
||||
template: `
|
||||
<div class="item-content">
|
||||
|
@ -4,7 +4,8 @@ import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {ControlGroup, ControlDirective} from 'angular2/forms'
|
||||
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'ion-search-bar',
|
||||
@ -98,7 +99,7 @@ export class SearchPipe extends Pipe {
|
||||
}
|
||||
*/
|
||||
|
||||
new IonicComponent(SearchBar, {
|
||||
new IonicComponent_OLD(SearchBar, {
|
||||
properties: {
|
||||
cancelText: {
|
||||
defaults: {
|
||||
|
@ -6,7 +6,7 @@ import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {ControlGroup, ControlDirective} from 'angular2/forms'
|
||||
import {dom} from 'ionic/util';
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
import {Button} from 'ionic/components/button/button'
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ export class Segment {
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(Segment, {
|
||||
new IonicComponent_OLD(Segment, {
|
||||
});
|
||||
|
||||
@Component({
|
||||
|
@ -9,7 +9,7 @@ import {DragGesture} from 'ionic/gestures/drag-gesture';
|
||||
import * as util from 'ionic/util';
|
||||
|
||||
import {dom} from 'ionic/util'
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
import {Hammer} from 'ionic/gestures/hammer';
|
||||
|
||||
@ -464,7 +464,7 @@ export class Slides {
|
||||
}
|
||||
|
||||
}
|
||||
new IonicComponent(Slides, {
|
||||
new IonicComponent_OLD(Slides, {
|
||||
});
|
||||
|
||||
@Component({
|
||||
@ -515,7 +515,7 @@ export class Slide {
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(Slide, {
|
||||
new IonicComponent_OLD(Slide, {
|
||||
});
|
||||
|
||||
@Component({
|
||||
@ -543,7 +543,7 @@ export class SlidePager {
|
||||
return this.slides.slides;
|
||||
}
|
||||
}
|
||||
new IonicComponent(SlidePager, {
|
||||
new IonicComponent_OLD(SlidePager, {
|
||||
});
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@ import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
|
||||
import {ControlGroup, ControlDirective} from 'angular2/forms'
|
||||
import {dom} from 'ionic/util';
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {IonicComponent_OLD} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-switch',
|
||||
@ -90,4 +90,4 @@ export class Switch {
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(Switch, {})
|
||||
new IonicComponent_OLD(Switch, {})
|
||||
|
@ -11,10 +11,10 @@ import {ViewController} from '../view/view-controller';
|
||||
import {ViewItem} from '../view/view-item';
|
||||
import {TabButton} from './tab-button';
|
||||
import {Icon} from '../icon/icon';
|
||||
import {IonicComponentNEW} from '../../config/component';
|
||||
import {IonicComponent} from '../../config/component';
|
||||
|
||||
|
||||
@IonicComponentNEW(Tabs)
|
||||
@IonicComponent(Tabs)
|
||||
@View({
|
||||
template: `
|
||||
<nav class="navbar-container tab-bar-container">
|
||||
|
@ -19,7 +19,7 @@ export class IonicDirective extends Directive {
|
||||
}
|
||||
}
|
||||
|
||||
export class IonicComponentNEW extends Component {
|
||||
export class IonicComponent extends Component {
|
||||
constructor(ComponentType) {
|
||||
super( appendModeConfig(ComponentType) );
|
||||
}
|
||||
@ -86,7 +86,7 @@ function appendModeConfig(ComponentType) {
|
||||
return config;
|
||||
}
|
||||
|
||||
export class IonicComponent {
|
||||
export class IonicComponent_OLD {
|
||||
constructor(ComponentType, {
|
||||
properties,
|
||||
bind,
|
||||
|
Reference in New Issue
Block a user