From 369d78b021622ba9aa4dab0f632bf7d9c5928c93 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 29 Apr 2016 15:47:48 -0500 Subject: [PATCH] fix(button): remove unnecessary ion-button-effect elements --- ionic/components/action-sheet/action-sheet.ts | 7 +------ ionic/components/alert/alert.ts | 6 +----- ionic/components/loading/loading.ts | 6 +----- ionic/components/navbar/navbar.ts | 3 +-- ionic/components/toast/toast.ts | 7 +------ 5 files changed, 5 insertions(+), 24 deletions(-) diff --git a/ionic/components/action-sheet/action-sheet.ts b/ionic/components/action-sheet/action-sheet.ts index e6578d9bc99..cf637bd0485 100644 --- a/ionic/components/action-sheet/action-sheet.ts +++ b/ionic/components/action-sheet/action-sheet.ts @@ -1,5 +1,4 @@ -import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core'; -import {NgFor, NgIf} from 'angular2/common'; +import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core'; import {Animation} from '../../animations/animation'; import {Transition, TransitionOptions} from '../../transitions/transition'; @@ -225,14 +224,12 @@ export class ActionSheet extends ViewController { '' + '' + '
' + '' + '
' + '' + @@ -242,8 +239,6 @@ export class ActionSheet extends ViewController { '[attr.aria-labelledby]': 'hdrId', '[attr.aria-describedby]': 'descId' }, - directives: [NgFor, NgIf, Icon], - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) class ActionSheetCmp { diff --git a/ionic/components/alert/alert.ts b/ionic/components/alert/alert.ts index 12f1b64d2ab..c18df8ca855 100644 --- a/ionic/components/alert/alert.ts +++ b/ionic/components/alert/alert.ts @@ -1,5 +1,4 @@ -import {Component, ElementRef, Renderer, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core'; -import {NgClass, NgSwitch, NgIf, NgFor} from 'angular2/common'; +import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from 'angular2/core'; import {Animation} from '../../animations/animation'; import {Transition, TransitionOptions} from '../../transitions/transition'; @@ -355,7 +354,6 @@ export class Alert extends ViewController { '
' + '' + '
' + '', @@ -364,8 +362,6 @@ export class Alert extends ViewController { '[attr.aria-labelledby]': 'hdrId', '[attr.aria-describedby]': 'descId' }, - directives: [NgClass, NgSwitch, NgIf, NgFor], - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) class AlertCmp { diff --git a/ionic/components/loading/loading.ts b/ionic/components/loading/loading.ts index 1efbde056e2..5a6aec47b5e 100644 --- a/ionic/components/loading/loading.ts +++ b/ionic/components/loading/loading.ts @@ -1,10 +1,8 @@ -import {Component, Renderer, ElementRef, HostListener, ChangeDetectionStrategy, ViewEncapsulation} from 'angular2/core'; -import {NgFor, NgIf} from 'angular2/common'; +import {Component, Renderer, ElementRef, HostListener, ViewEncapsulation} from 'angular2/core'; import {Animation} from '../../animations/animation'; import {Transition, TransitionOptions} from '../../transitions/transition'; import {Config} from '../../config/config'; -import {Spinner} from '../spinner/spinner'; import {isPresent, isUndefined, isDefined} from '../../util/util'; import {NavParams} from '../nav/nav-params'; import {ViewController} from '../nav/view-controller'; @@ -163,8 +161,6 @@ export class Loading extends ViewController { host: { 'role': 'dialog' }, - directives: [NgIf, Spinner], - changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, }) class LoadingCmp { diff --git a/ionic/components/navbar/navbar.ts b/ionic/components/navbar/navbar.ts index cd571be8a3e..42c4592a083 100644 --- a/ionic/components/navbar/navbar.ts +++ b/ionic/components/navbar/navbar.ts @@ -98,7 +98,6 @@ class ToolbarBackground { '{{_bbText}}' + '' + '' + - '' + '' + '' + '' + @@ -111,7 +110,7 @@ class ToolbarBackground { 'class': 'toolbar', '[class.statusbar-padding]': '_sbPadding' }, - directives: [BackButton, BackButtonText, Icon, ToolbarBackground] + directives: [BackButton, BackButtonText, ToolbarBackground] }) export class Navbar extends ToolbarBase { private _bbIcon: string; diff --git a/ionic/components/toast/toast.ts b/ionic/components/toast/toast.ts index 52afca33e60..703e4b63eee 100644 --- a/ionic/components/toast/toast.ts +++ b/ionic/components/toast/toast.ts @@ -1,8 +1,5 @@ import {Component, ElementRef, Renderer, Output, EventEmitter} from 'angular2/core'; -import {NgClass, NgIf, NgFor} from 'angular2/common'; -import {Button} from '../button/button'; -import {Icon} from '../icon/icon'; import {ActionSheet, ActionSheetOptions} from '../action-sheet/action-sheet'; import {Animation} from '../../animations/animation'; import {Transition, TransitionOptions} from '../../transitions/transition'; @@ -131,7 +128,6 @@ export class Toast extends ViewController {
{{d.message}}
@@ -139,9 +135,8 @@ export class Toast extends ViewController { host: { 'role': 'dialog', '[attr.aria-labelledby]': 'hdrId', - '[attr.aria-describedby]': 'descId' + '[attr.aria-describedby]': 'descId', }, - directives: [NgIf, Icon, Button] }) class ToastCmp { private d: any;