mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
alpha35 update
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* The ActionMenu is a modal menu with options to select based on an action.
|
||||
*/
|
||||
|
||||
import {View, Injectable, NgFor, NgIf, CSSClass} from 'angular2/angular2';
|
||||
import {View, Injectable, NgFor, NgIf, NgClass} from 'angular2/angular2';
|
||||
|
||||
import {TapClick} from '../button/button';
|
||||
import {Overlay} from '../overlay/overlay';
|
||||
@ -22,19 +22,19 @@ import * as util from 'ionic/util';
|
||||
'<div class="action-menu-group action-menu-options">' +
|
||||
'<div class="action-menu-title" *ng-if="titleText">{{titleText}}</div>' +
|
||||
'<button (^click)="_buttonClicked(index)" *ng-for="#b of buttons; #index = index" class="action-menu-option">' +
|
||||
'<i class="icon" [class]="b.icon" *ng-if="b.icon"></i> ' +
|
||||
'<i class="icon" [ng-class]="b.icon" *ng-if="b.icon"></i> ' +
|
||||
'{{b.text}}' +
|
||||
'</button>' +
|
||||
'<button *ng-if="destructiveText" (click)="_destructive()" class="destructive action-menu-destructive">' +
|
||||
'<i class="icon" [class]="destructiveIcon" *ng-if="destructiveIcon"></i> ' +
|
||||
'<i class="icon" [ng-class]="destructiveIcon" *ng-if="destructiveIcon"></i> ' +
|
||||
'{{destructiveText}}</button>' +
|
||||
'</div>' +
|
||||
'<div class="action-menu-group action-menu-cancel" *ng-if="cancelText">' +
|
||||
'<button (click)="_cancel()"><i class="icon" [class]="cancelIcon"></i> {{cancelText}}</button>' +
|
||||
'<button (click)="_cancel()"><i class="icon" [ng-class]="cancelIcon"></i> {{cancelText}}</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</action-menu-wrapper>',
|
||||
directives: [NgFor, NgIf, CSSClass, TapClick]
|
||||
directives: [NgFor, NgIf, NgClass, TapClick]
|
||||
})
|
||||
class ActionMenuDirective {
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/forms';
|
||||
import {Log} from 'ionic/util'
|
||||
|
||||
import {App, IonicView, NavController} from 'ionic/ionic'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Directive, ElementRef} from 'angular2/angular2';
|
||||
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {App, NavController, IonicView} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
import {Control, ControlGroup, formDirectives} from 'angular2/forms';
|
||||
import {Control, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {App, Http} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {ElementRef} from 'angular2/angular2'
|
||||
import {Component, Directive} from 'angular2/angular2';
|
||||
import {FormBuilder, Control, ControlGroup, Validators, formDirectives} from 'angular2/forms';
|
||||
import {FormBuilder, Control, ControlGroup, Validators} from 'angular2/forms';
|
||||
|
||||
import {App, Modal, Animation, Content} from 'ionic/ionic';
|
||||
import {NavController, NavParams, IonicView} from 'ionic/ionic';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/angular2';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/angular2';
|
||||
|
||||
import {IonicApp, IonicView} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {IonicApp, IonicView} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Validators, formDirectives, Control, ControlGroup} from 'angular2/angular2';
|
||||
import {FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {IonicApp, IonicView, NavController} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Control, ControlGroup, Validators, formDirectives} from 'angular2/forms';
|
||||
import {FormBuilder, Control, ControlGroup, Validators} from 'angular2/forms';
|
||||
|
||||
import {App, IonicView, Animation, Modal, NavController, NavParams} from 'ionic/ionic';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Component, Directive, View} from 'angular2/angular2';
|
||||
import {NgIf, NgFor, CSSClass, ElementRef} from 'angular2/angular2';
|
||||
import {FormBuilder, Control, ControlGroup, Validators, formDirectives} from 'angular2/forms';
|
||||
import {NgIf, NgFor, NgClass, ElementRef} from 'angular2/angular2';
|
||||
import {FormBuilder, Control, ControlGroup, Validators, FORM_DIRECTIVES} from 'angular2/forms';
|
||||
|
||||
import {App, IonicView, Animation, Content, Scroll, Modal, NavController, NavParams} from 'ionic/ionic';
|
||||
|
||||
@ -33,7 +33,7 @@ import {Flickr} from './flickr';
|
||||
</form>
|
||||
</ion-content>
|
||||
</ion-view>`,
|
||||
directives: [formDirectives]
|
||||
directives: [FORM_DIRECTIVES]
|
||||
})
|
||||
export class SettingsModal {
|
||||
constructor(fb: FormBuilder) {
|
||||
@ -63,8 +63,8 @@ let WEATHER_ICONS = {
|
||||
]
|
||||
})
|
||||
@View({
|
||||
template: '<i class="icon" [class]="weatherIcon"></i>',
|
||||
directives: [CSSClass]
|
||||
template: '<i class="icon" [ng-class]="weatherIcon"></i>',
|
||||
directives: [NgClass]
|
||||
})
|
||||
export class WeatherIcon {
|
||||
constructor() {
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
Control,
|
||||
ControlGroup,
|
||||
NgForm,
|
||||
formDirectives,
|
||||
Validators,
|
||||
NgControl,
|
||||
ControlValueAccessor,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Directive, View, CSSClass, ElementRef, Optional, Host, Attribute, Renderer} from 'angular2/angular2';
|
||||
import {Directive, View, NgClass, ElementRef, Optional, Host, Attribute, Renderer} from 'angular2/angular2';
|
||||
|
||||
import {IonicConfig} from '../../config/config';
|
||||
import {IonicComponent} from '../../config/annotations';
|
||||
@ -141,8 +141,8 @@ export class IconDirective {
|
||||
}
|
||||
})
|
||||
@View({
|
||||
template: '<i class="icon" [class]="iconClass">',
|
||||
directives: [CSSClass]
|
||||
template: '<i class="icon" [ng-class]="iconClass">',
|
||||
directives: [NgClass]
|
||||
})
|
||||
export class Icon extends Ion {
|
||||
constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {formDirectives, NgControl, NgControlGroup,
|
||||
Component, View, Injectable, CSSClass, NgIf, NgFor} from 'angular2/angular2';
|
||||
import {FORM_DIRECTIVES, NgControl, NgControlGroup,
|
||||
Component, View, Injectable, NgClass, NgIf, NgFor} from 'angular2/angular2';
|
||||
|
||||
import {Overlay} from '../overlay/overlay';
|
||||
import {Animation} from '../../animations/animation';
|
||||
@ -139,10 +139,10 @@ const OVERLAY_TYPE = 'popup';
|
||||
'<input type="text" *ng-if="showPrompt" placeholder="{{promptPlaceholder}}">' +
|
||||
'</div>' +
|
||||
'<div class="popup-buttons" *ng-if="buttons.length">' +
|
||||
'<button *ng-for="#button of buttons" (click)="buttonTapped(button, $event)" [class]="button.type || \'button-default\'" [inner-html]="button.text"></button>' +
|
||||
'<button *ng-for="#button of buttons" (click)="buttonTapped(button, $event)" [ng-class]="button.type || \'button-default\'" [inner-html]="button.text"></button>' +
|
||||
'</div>' +
|
||||
'</popup-wrapper>',
|
||||
directives: [formDirectives, CSSClass, NgIf, NgFor]
|
||||
directives: [FORM_DIRECTIVES, NgClass, NgIf, NgFor]
|
||||
})
|
||||
|
||||
class StandardPopup {
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
Control,
|
||||
ControlGroup,
|
||||
NgForm,
|
||||
formDirectives,
|
||||
Validators,
|
||||
NgControl,
|
||||
ControlValueAccessor,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, View, NgIf, CSSClass, ElementRef, EventEmitter, Host} from 'angular2/angular2'
|
||||
import {Component, View, NgIf, NgClass, ElementRef, EventEmitter, Host} from 'angular2/angular2'
|
||||
|
||||
import {Content} from '../content/content';
|
||||
|
||||
@ -25,16 +25,16 @@ import {raf, ready, CSS} from 'ionic/util/dom';
|
||||
@View({
|
||||
template: `<div class="refresher-content" [class.refresher-with-text]="pullingText || refreshingText">
|
||||
<div class="icon-pulling">
|
||||
<i class="icon" [class]="pullingIcon"></i>
|
||||
<i class="icon" [ng-class]="pullingIcon"></i>
|
||||
</div>
|
||||
<div class="text-pulling" [inner-html]="pullingText" *ng-if="pullingText"></div>
|
||||
<div class="icon-refreshing">
|
||||
<!--<ion-spinner ng-if="showSpinner" icon="{{spinner}}"></ion-spinner>-->
|
||||
<i class="icon" [class]="refreshingIcon"></i>
|
||||
<i class="icon" [ng-class]="refreshingIcon"></i>
|
||||
</div>
|
||||
<div class="text-refreshing" [inner-html]="refreshingText" *ng-if="refreshingText"></div>
|
||||
</div>`,
|
||||
directives: [NgIf, CSSClass]
|
||||
directives: [NgIf, NgClass]
|
||||
})
|
||||
export class Refresher {
|
||||
constructor(
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {FormBuilder, Validators, formDirectives, Control, ControlGroup} from 'angular2/forms';
|
||||
import {FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {App} from 'ionic/ionic';
|
||||
import {SearchPipe} from 'ionic/components/search-bar/search-bar';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {formDirectives, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
||||
|
||||
import {App} from 'ionic/ionic';
|
||||
|
||||
@ -6,7 +6,7 @@ import {App} from 'ionic/ionic';
|
||||
@App({
|
||||
templateUrl: 'main.html',
|
||||
appInjector: [FormBuilder],
|
||||
directives: [formDirectives]
|
||||
directives: [FORM_DIRECTIVES]
|
||||
})
|
||||
class IonicApp {
|
||||
constructor(fb: FormBuilder) {
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
Control,
|
||||
ControlGroup,
|
||||
NgForm,
|
||||
formDirectives,
|
||||
Validators,
|
||||
NgControl,
|
||||
ControlValueAccessor,
|
||||
|
@ -3,7 +3,6 @@ import {
|
||||
Control,
|
||||
ControlGroup,
|
||||
NgForm,
|
||||
formDirectives,
|
||||
Validators,
|
||||
NgControl,
|
||||
ControlValueAccessor,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {coreDirectives, formDirectives, Component, Directive, View, forwardRef} from 'angular2/angular2'
|
||||
import {CORE_DIRECTIVES, FORM_DIRECTIVES, Component, Directive, View, forwardRef} from 'angular2/angular2'
|
||||
|
||||
import * as util from 'ionic/util';
|
||||
import {IonicConfig} from './config';
|
||||
@ -28,8 +28,8 @@ import {
|
||||
// TODO: Why is forwardRef() required when they're already imported above????
|
||||
export const IonicDirectives = [
|
||||
// Angular
|
||||
coreDirectives,
|
||||
formDirectives,
|
||||
CORE_DIRECTIVES,
|
||||
FORM_DIRECTIVES,
|
||||
|
||||
// Content
|
||||
forwardRef(() => Aside),
|
||||
|
Reference in New Issue
Block a user