mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
upgrade angular
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import {Component, Template, NgElement, PropertySetter} from 'angular2/angular2'
|
||||
import {IonicComponent} from 'ionic2/config/component'
|
||||
import {Component, View, NgElement, PropertySetter} from 'angular2/angular2'
|
||||
import {ComponentConfig} from 'ionic/config/component-config'
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
export let CheckboxConfig = new ComponentConfig('checkbox')
|
||||
|
||||
@Component({
|
||||
selector: 'ion-checkbox',
|
||||
@@ -9,10 +11,11 @@ import {IonicComponent} from 'ionic2/config/component'
|
||||
},
|
||||
events: {
|
||||
'^click': 'onClick()'
|
||||
}
|
||||
},
|
||||
injectables: [CheckboxConfig]
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
@View({
|
||||
template: `
|
||||
<div class="item-media media-checkbox">
|
||||
<icon class="checkbox-off"></icon>
|
||||
<icon class="checkbox-on"></icon>
|
||||
@@ -28,6 +31,7 @@ import {IonicComponent} from 'ionic2/config/component'
|
||||
})
|
||||
export class Checkbox {
|
||||
constructor(
|
||||
configFactory: CheckboxConfig,
|
||||
@NgElement() ngElement: NgElement,
|
||||
@PropertySetter('attr.role') setAriaRole: Function,
|
||||
@PropertySetter('attr.aria-checked') setAriaChecked: Function,
|
||||
|
||||
@@ -1,14 +1,10 @@
|
||||
import {bootstrap} from 'angular2/core';
|
||||
import {Component, Template} from 'angular2/angular2';
|
||||
import {View} from 'ionic2/components/view/view';
|
||||
import {Content} from 'ionic2/components/content/content';
|
||||
import {Icon} from 'ionic2/components/icon/icon';
|
||||
import {Checkbox} from 'ionic2/components/checkbox/checkbox';
|
||||
import {List} from 'ionic2/components/list/list';
|
||||
import {Component, View, bootstrap} from 'angular2/angular2';
|
||||
import {View as NgView} from 'ionic/components/view/view';
|
||||
import {Content, Icon, Checkbox, List} from 'ionic/components';
|
||||
|
||||
@Component({ selector: '[ion-app]' })
|
||||
@Template({
|
||||
url: 'main.html',
|
||||
@View({
|
||||
templateUrl: 'main.html',
|
||||
directives: [View, Content, Icon, Checkbox, List]
|
||||
})
|
||||
class IonicApp {
|
||||
|
||||
Reference in New Issue
Block a user