Skip to content

Commit 369d78b

Browse files
committed
fix(button): remove unnecessary ion-button-effect elements
1 parent 4c8ee95 commit 369d78b

File tree

5 files changed

+5
-24
lines changed

5 files changed

+5
-24
lines changed

ionic/components/action-sheet/action-sheet.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
2-
import {NgFor, NgIf} from 'angular2/common';
1+
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
32

43
import {Animation} from '../../animations/animation';
54
import {Transition, TransitionOptions} from '../../transitions/transition';
@@ -225,14 +224,12 @@ export class ActionSheet extends ViewController {
225224
'<button category="action-sheet-button" (click)="click(b)" *ngFor="#b of d.buttons" class="disable-hover" [ngClass]="b.cssClass">' +
226225
'<ion-icon [name]="b.icon" *ngIf="b.icon" class="action-sheet-icon"></ion-icon> ' +
227226
'{{b.text}}' +
228-
'<ion-button-effect></ion-button-effect>' +
229227
'</button>' +
230228
'</div>' +
231229
'<div class="action-sheet-group" *ngIf="d.cancelButton">' +
232230
'<button category="action-sheet-button" (click)="click(d.cancelButton)" class="action-sheet-cancel disable-hover" [ngClass]="d.cancelButton.cssClass">' +
233231
'<ion-icon [name]="d.cancelButton.icon" *ngIf="d.cancelButton.icon" class="action-sheet-icon"></ion-icon> ' +
234232
'{{d.cancelButton.text}}' +
235-
'<ion-button-effect></ion-button-effect>' +
236233
'</button>' +
237234
'</div>' +
238235
'</div>' +
@@ -242,8 +239,6 @@ export class ActionSheet extends ViewController {
242239
'[attr.aria-labelledby]': 'hdrId',
243240
'[attr.aria-describedby]': 'descId'
244241
},
245-
directives: [NgFor, NgIf, Icon],
246-
changeDetection: ChangeDetectionStrategy.OnPush,
247242
encapsulation: ViewEncapsulation.None,
248243
})
249244
class ActionSheetCmp {

ionic/components/alert/alert.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import {Component, ElementRef, Renderer, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
2-
import {NgClass, NgSwitch, NgIf, NgFor} from 'angular2/common';
1+
import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from 'angular2/core';
32

43
import {Animation} from '../../animations/animation';
54
import {Transition, TransitionOptions} from '../../transitions/transition';
@@ -355,7 +354,6 @@ export class Alert extends ViewController {
355354
'<div class="alert-button-group" [ngClass]="{vertical: d.buttons.length>2}">' +
356355
'<button category="alert-button" *ngFor="#b of d.buttons" (click)="btnClick(b)" [ngClass]="b.cssClass">' +
357356
'{{b.text}}' +
358-
'<ion-button-effect></ion-button-effect>' +
359357
'</button>' +
360358
'</div>' +
361359
'</div>',
@@ -364,8 +362,6 @@ export class Alert extends ViewController {
364362
'[attr.aria-labelledby]': 'hdrId',
365363
'[attr.aria-describedby]': 'descId'
366364
},
367-
directives: [NgClass, NgSwitch, NgIf, NgFor],
368-
changeDetection: ChangeDetectionStrategy.OnPush,
369365
encapsulation: ViewEncapsulation.None,
370366
})
371367
class AlertCmp {

ionic/components/loading/loading.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core';
2-
import {NgFor, NgIf} from 'angular2/common';
1+
import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core';
32

43
import {Animation} from '../../animations/animation';
54
import {Transition, TransitionOptions} from '../../transitions/transition';
65
import {Config} from '../../config/config';
7-
import {Spinner} from '../spinner/spinner';
86
import {isPresent, isUndefined, isDefined} from '../../util/util';
97
import {NavParams} from '../nav/nav-params';
108
import {ViewController} from '../nav/view-controller';
@@ -163,8 +161,6 @@ export class Loading extends ViewController {
163161
host: {
164162
'role': 'dialog'
165163
},
166-
directives: [NgIf, Spinner],
167-
changeDetection: ChangeDetectionStrategy.OnPush,
168164
encapsulation: ViewEncapsulation.None,
169165
})
170166
class LoadingCmp {

ionic/components/navbar/navbar.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ class ToolbarBackground {
9898
'<span class="back-default">{{_bbText}}</span>' +
9999
'</span>' +
100100
'</span>' +
101-
'<ion-button-effect></ion-button-effect>' +
102101
'</button>' +
103102
'<ng-content select="[menuToggle],ion-buttons[left]"></ng-content>' +
104103
'<ng-content select="ion-buttons[start]"></ng-content>' +
@@ -111,7 +110,7 @@ class ToolbarBackground {
111110
'class': 'toolbar',
112111
'[class.statusbar-padding]': '_sbPadding'
113112
},
114-
directives: [BackButton, BackButtonText, Icon, ToolbarBackground]
113+
directives: [BackButton, BackButtonText, ToolbarBackground]
115114
})
116115
export class Navbar extends ToolbarBase {
117116
private _bbIcon: string;

ionic/components/toast/toast.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import {Component, ElementRef, Renderer, Output, EventEmitter} from 'angular2/core';
2-
import {NgClass, NgIf, NgFor} from 'angular2/common';
32

4-
import {Button} from '../button/button';
5-
import {Icon} from '../icon/icon';
63
import {ActionSheet, ActionSheetOptions} from '../action-sheet/action-sheet';
74
import {Animation} from '../../animations/animation';
85
import {Transition, TransitionOptions} from '../../transitions/transition';
@@ -131,17 +128,15 @@ export class Toast extends ViewController {
131128
<div class="toast-message" id="{{hdrId}}" *ngIf="d.message">{{d.message}}</div>
132129
<button clear class="toast-button" *ngIf="d.showCloseButton" (click)="cbClick()">
133130
{{ d.closeButtonText || 'Close' }}
134-
<ion-button-effect></ion-button-effect>
135131
</button>
136132
</div>
137133
</div>
138134
`,
139135
host: {
140136
'role': 'dialog',
141137
'[attr.aria-labelledby]': 'hdrId',
142-
'[attr.aria-describedby]': 'descId'
138+
'[attr.aria-describedby]': 'descId',
143139
},
144-
directives: [NgIf, Icon, Button]
145140
})
146141
class ToastCmp {
147142
private d: any;

0 commit comments

Comments
 (0)