mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-26 08:13:34 +08:00
upgrade angular
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
import {NgElement, Component, Template} from 'angular2/angular2'
|
||||
import {IonicComponent} from 'ionic2/config/component'
|
||||
import {NgElement, Component, View} from 'angular2/angular2'
|
||||
import {ComponentConfig} from 'ionic/config/component-config';
|
||||
|
||||
export let RadioConfig = new ComponentConfig('radio');
|
||||
|
||||
@Component({
|
||||
selector: 'ion-radio'
|
||||
selector: 'ion-radio',
|
||||
injectables: [RadioConfig]
|
||||
})
|
||||
@Template({
|
||||
inline: `
|
||||
@View({
|
||||
template: `
|
||||
<div class="item-content">
|
||||
|
||||
<div class="item-title">
|
||||
@ -23,14 +25,13 @@ import {IonicComponent} from 'ionic2/config/component'
|
||||
})
|
||||
export class RadioButton {
|
||||
constructor(
|
||||
configFactory: RadioConfig,
|
||||
element: NgElement
|
||||
) {
|
||||
this.domElement = element.domElement
|
||||
this.config = RadioButton.config.invoke(this)
|
||||
|
||||
this.domElement.classList.add('item')
|
||||
this.domElement.setAttribute('aria-checked', true)
|
||||
|
||||
configFactory.create(this)
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(RadioButton, {})
|
||||
|
@ -1,22 +1,23 @@
|
||||
import {NgElement, Component, Template} from 'angular2/angular2'
|
||||
import {IonicComponent} from 'ionic2/config/component'
|
||||
import {NgElement, Component, View} from 'angular2/angular2'
|
||||
import {ComponentConfig} from 'ionic/config/component-config';
|
||||
|
||||
export let RadioConfig = new ComponentConfig('radio');
|
||||
|
||||
@Component({
|
||||
selector: 'ion-radio-group'
|
||||
selector: 'ion-radio-group',
|
||||
injectables: [RadioConfig]
|
||||
})
|
||||
@Template({
|
||||
inline: `<content></content>`
|
||||
@View({
|
||||
template: `<content></content>`
|
||||
})
|
||||
export class RadioGroup {
|
||||
constructor(
|
||||
configFactory: RadioConfig,
|
||||
element: NgElement
|
||||
) {
|
||||
this.domElement = element.domElement
|
||||
this.config = RadioGroup.config.invoke(this)
|
||||
|
||||
this.domElement.classList.add('list')
|
||||
this.domElement.classList.add('radio-group')
|
||||
configFactory.create(this)
|
||||
}
|
||||
}
|
||||
|
||||
new IonicComponent(RadioGroup, {})
|
||||
|
@ -1,15 +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 {RadioGroup} from 'ionic2/components/radio/radio-group';
|
||||
import {RadioButton} from 'ionic2/components/radio/radio-button';
|
||||
import {Component, View as NgView, bootstrap} from 'angular2/angular2';
|
||||
import {View, Content, Icon, RadioGroup, RadioButton} from 'ionic/components';
|
||||
|
||||
|
||||
@Component({ selector: '[ion-app]' })
|
||||
@Template({
|
||||
url: 'main.html',
|
||||
@NgView({
|
||||
templateUrl: 'main.html',
|
||||
directives: [View, Content, RadioGroup, RadioButton]
|
||||
})
|
||||
class IonicApp {
|
||||
|
Reference in New Issue
Block a user