diff --git a/src/components/action-sheet/action-sheet-component.ts b/src/components/action-sheet/action-sheet-component.ts
index 91affbf9f3..1e2f9cb8b9 100644
--- a/src/components/action-sheet/action-sheet-component.ts
+++ b/src/components/action-sheet/action-sheet-component.ts
@@ -1,8 +1,11 @@
import { Component, Renderer, ElementRef, HostListener, ViewEncapsulation } from '@angular/core';
+import { NgClass, NgFor, NgIf } from '@angular/common';
import { Animation } from '../../animations/animation';
+import { Backdrop } from '../backdrop/backdrop';
import { Config } from '../../config/config';
import { Form } from '../../util/form';
+import { Icon } from '../icon/icon';
import { Key } from '../../util/key';
import { NavParams } from '../nav/nav-params';
import { Transition, TransitionOptions } from '../../transitions/transition';
@@ -35,6 +38,7 @@ import { ViewController } from '../nav/view-controller';
`,
+ directives: [Backdrop, Icon, NgClass, NgFor, NgIf],
host: {
'role': 'dialog',
'[attr.aria-labelledby]': 'hdrId',
diff --git a/src/components/alert/alert-component.ts b/src/components/alert/alert-component.ts
index 77921630b2..1af274fc6b 100644
--- a/src/components/alert/alert-component.ts
+++ b/src/components/alert/alert-component.ts
@@ -1,12 +1,15 @@
-import {Component, ElementRef, Renderer, HostListener, ViewEncapsulation} from '@angular/core';
+import { Component, ElementRef, HostListener, Renderer, ViewEncapsulation } from '@angular/core';
+import { NgClass, NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault } from '@angular/common';
+import { NgModel } from '@angular/forms';
-import {Animation} from '../../animations/animation';
-import {Config} from '../../config/config';
-import {isPresent} from '../../util/util';
-import {Key} from '../../util/key';
-import {NavParams} from '../nav/nav-params';
-import {Transition, TransitionOptions} from '../../transitions/transition';
-import {ViewController} from '../nav/view-controller';
+import { Animation } from '../../animations/animation';
+import { Backdrop } from '../backdrop/backdrop';
+import { Config } from '../../config/config';
+import { isPresent } from '../../util/util';
+import { Key } from '../../util/key';
+import { NavParams } from '../nav/nav-params';
+import { Transition, TransitionOptions } from '../../transitions/transition';
+import { ViewController } from '../nav/view-controller';
/**
@@ -62,6 +65,7 @@ import {ViewController} from '../nav/view-controller';
`,
+ directives: [Backdrop, NgClass, NgFor, NgIf, NgModel, NgSwitch, NgSwitchCase, NgSwitchDefault],
host: {
'role': 'dialog',
'[attr.aria-labelledby]': 'hdrId',
diff --git a/src/components/button/button.ts b/src/components/button/button.ts
index c4f23503c7..cd282f7ae6 100644
--- a/src/components/button/button.ts
+++ b/src/components/button/button.ts
@@ -35,11 +35,8 @@ import {isTrueProperty} from '../../util/util';
*/
@Component({
selector: 'button:not([ion-item]),[button]',
- template:
- '' +
- '' +
- '' +
- '',
+ // NOTE: template must not contain spaces between elements
+ template: '',
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
diff --git a/src/components/checkbox/checkbox.ts b/src/components/checkbox/checkbox.ts
index 279699f7d9..f41d8ef18c 100644
--- a/src/components/checkbox/checkbox.ts
+++ b/src/components/checkbox/checkbox.ts
@@ -5,7 +5,7 @@ import { Form } from '../../util/form';
import { Item } from '../item/item';
import { isTrueProperty } from '../../util/util';
-const CHECKBOX_VALUE_ACCESSOR = new Provider(
+export const CHECKBOX_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Checkbox), multi: true});
@@ -49,19 +49,20 @@ const CHECKBOX_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: 'ion-checkbox',
- template:
- '
' +
- '',
+ template: `
+
+
+ `,
host: {
'[class.checkbox-disabled]': '_disabled'
},
diff --git a/src/components/datetime/datetime.ts b/src/components/datetime/datetime.ts
index 42f9eb437f..1ed8e67137 100644
--- a/src/components/datetime/datetime.ts
+++ b/src/components/datetime/datetime.ts
@@ -10,7 +10,7 @@ import { merge, isBlank, isPresent, isTrueProperty, isArray, isString } from '..
import { dateValueRange, renderDateTime, renderTextFormat, convertFormatToKey, getValueFromFormat, parseTemplate, parseDate, updateDate, DateTimeData, convertDataToISO, daysInMonth, dateSortValue, dateDataSortValue, LocaleData } from '../../util/datetime-util';
import { NavController } from '../nav/nav-controller';
-const DATETIME_VALUE_ACCESSOR = new Provider(
+export const DATETIME_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => DateTime), multi: true});
@@ -248,16 +248,17 @@ const DATETIME_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: 'ion-datetime',
- template:
- '{{_text}}
' +
- '',
+ template: `
+ {{_text}}
+
+ `,
host: {
'[class.datetime-disabled]': '_disabled'
},
diff --git a/src/components/infinite-scroll/infinite-scroll-content.ts b/src/components/infinite-scroll/infinite-scroll-content.ts
index e7737bb8da..b886de3268 100644
--- a/src/components/infinite-scroll/infinite-scroll-content.ts
+++ b/src/components/infinite-scroll/infinite-scroll-content.ts
@@ -1,7 +1,9 @@
import { Component, Input, ViewEncapsulation } from '@angular/core';
+import { NgIf } from '@angular/common';
import { Config } from '../../config/config';
import { InfiniteScroll } from './infinite-scroll';
+import { Spinner } from '../spinner/spinner';
/**
@@ -16,6 +18,7 @@ import { InfiniteScroll } from './infinite-scroll';
'' +
'' +
'',
+ directives: [NgIf, Spinner],
host: {
'[attr.state]': 'inf.state'
},
diff --git a/src/components/input/input.ts b/src/components/input/input.ts
index ce41672aca..83def536f5 100644
--- a/src/components/input/input.ts
+++ b/src/components/input/input.ts
@@ -1,5 +1,6 @@
import { Component, Optional, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
-import { NgControl } from '@angular/forms';
+import { NgIf } from '@angular/common';
+import { NgControl, NgModel } from '@angular/forms';
import { App } from '../app/app';
import { Config } from '../../config/config';
@@ -74,15 +75,13 @@ import { Platform } from '../../platform/platform';
*/
@Component({
selector: 'ion-input',
- template:
- '' +
- '' +
- '' +
- '',
- directives: [
- NextInput,
- NativeInput,
- ],
+ template: `
+
+
+
+
+ `,
+ directives: [NativeInput, NextInput, NgIf, NgModel],
encapsulation: ViewEncapsulation.None,
})
export class TextInput extends InputBase {
@@ -170,10 +169,7 @@ export class TextInput extends InputBase {
'' +
'' +
'',
- directives: [
- NextInput,
- NativeInput
- ],
+ directives: [NativeInput, NextInput, NgIf],
encapsulation: ViewEncapsulation.None,
})
export class TextArea extends InputBase {
diff --git a/src/components/item/item-sliding.ts b/src/components/item/item-sliding.ts
index 4286b67a13..652951b7bc 100644
--- a/src/components/item/item-sliding.ts
+++ b/src/components/item/item-sliding.ts
@@ -178,9 +178,10 @@ const enum SlidingState {
*/
@Component({
selector: 'ion-item-sliding',
- template:
- '' +
- '',
+ template: `
+
+
+ `,
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None
})
diff --git a/src/components/item/item.ts b/src/components/item/item.ts
index c98f66f248..41d3b4d5f5 100644
--- a/src/components/item/item.ts
+++ b/src/components/item/item.ts
@@ -1,4 +1,5 @@
import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, Directive, ElementRef, forwardRef, Input, Renderer, ViewChild, ViewEncapsulation } from '@angular/core';
+import { NgIf } from '@angular/common';
import { Button } from '../button/button';
import { Form } from '../../util/form';
@@ -267,21 +268,22 @@ import { Label } from '../label/label';
*/
@Component({
selector: 'ion-list-header,ion-item,[ion-item],ion-item-divider',
- template:
- '' +
- '' +
- '
' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '
' +
- '
' +
- '
' +
- '
' +
- '',
- directives: [forwardRef(() => Reorder)],
+ template: `
+
+
+
+ `,
+ directives: [NgIf, Label, forwardRef(() => Reorder)],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
diff --git a/src/components/loading/loading-component.ts b/src/components/loading/loading-component.ts
index f51465fc4a..ab294342b8 100644
--- a/src/components/loading/loading-component.ts
+++ b/src/components/loading/loading-component.ts
@@ -1,9 +1,12 @@
import { Component, ElementRef, Renderer, ViewEncapsulation } from '@angular/core';
+import { NgIf } from '@angular/common';
import { Animation } from '../../animations/animation';
+import { Backdrop } from '../backdrop/backdrop';
import { Config } from '../../config/config';
import { isDefined, isPresent, isUndefined } from '../../util/util';
import { NavParams } from '../nav/nav-params';
+import { Spinner } from '../spinner/spinner';
import { Transition, TransitionOptions } from '../../transitions/transition';
import { ViewController} from '../nav/view-controller';
@@ -13,14 +16,16 @@ import { ViewController} from '../nav/view-controller';
*/
@Component({
selector: 'ion-loading',
- template:
- '' +
- '' +
- '
' +
- '' +
- '
' +
- '
' +
- '
',
+ template: `
+
+
+ `,
+ directives: [Backdrop, NgIf, Spinner],
host: {
'role': 'dialog'
},
diff --git a/src/components/menu/menu.ts b/src/components/menu/menu.ts
index 49e2fbfe3b..acfe700450 100644
--- a/src/components/menu/menu.ts
+++ b/src/components/menu/menu.ts
@@ -179,9 +179,11 @@ import { Platform } from '../../platform/platform';
host: {
'role': 'navigation'
},
- template:
- '' +
- '',
+ template: `
+
+
+ `,
+ directives: [Backdrop],
changeDetection: ChangeDetectionStrategy.OnPush,
encapsulation: ViewEncapsulation.None,
})
@@ -281,17 +283,17 @@ export class Menu extends Ion {
/**
* @output {event} When the menu is being dragged open.
*/
- @Output() ionDrag: EventEmitter = new EventEmitter();
+ @Output() ionDrag: EventEmitter = new EventEmitter();
/**
* @output {event} When the menu has been opened.
*/
- @Output() ionOpen: EventEmitter = new EventEmitter();
+ @Output() ionOpen: EventEmitter = new EventEmitter();
/**
* @output {event} When the menu has been closed.
*/
- @Output() ionClose: EventEmitter = new EventEmitter();
+ @Output() ionClose: EventEmitter = new EventEmitter();
constructor(
private _menuCtrl: MenuController,
diff --git a/src/components/modal/modal-component.ts b/src/components/modal/modal-component.ts
index a45504b0a0..778754e3db 100644
--- a/src/components/modal/modal-component.ts
+++ b/src/components/modal/modal-component.ts
@@ -2,9 +2,10 @@ import { Component, ComponentResolver, HostListener, Renderer, ViewChild, ViewCo
import { addSelector } from '../../config/bootstrap';
import { Animation } from '../../animations/animation';
-import { pascalCaseToDashCase } from '../../util/util';
+import { Backdrop } from '../backdrop/backdrop';
import { Key } from '../../util/key';
import { NavParams } from '../nav/nav-params';
+import { pascalCaseToDashCase } from '../../util/util';
import { PageTransition } from '../../transitions/page-transition';
import { TransitionOptions } from '../../transitions/transition';
import { ViewController } from '../nav/view-controller';
@@ -21,7 +22,8 @@ import { windowDimensions } from '../../util/dom';
- `
+ `,
+ directives: [Backdrop]
})
export class ModalCmp {
diff --git a/src/components/navbar/navbar.ts b/src/components/navbar/navbar.ts
index 3aba3fa81b..6bbc656fe5 100644
--- a/src/components/navbar/navbar.ts
+++ b/src/components/navbar/navbar.ts
@@ -2,6 +2,7 @@ import { Component, Directive, ElementRef, forwardRef, Inject, Input, Optional }
import { App } from '../app/app';
import { Config } from '../../config/config';
+import { Icon } from '../icon/icon';
import { Ion } from '../ion';
import { isTrueProperty } from '../../util/util';
import { NavController } from '../nav/nav-controller';
@@ -94,28 +95,29 @@ class ToolbarBackground {
*/
@Component({
selector: 'ion-navbar',
- template:
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '
',
+ template: `
+
+
+
+
+
+
+
+
+ `,
+ directives: [BackButton, BackButtonText, Icon, ToolbarBackground],
host: {
'[hidden]': '_hidden',
'class': 'toolbar',
'[class.statusbar-padding]': '_sbPadding'
- },
- directives: [BackButton, BackButtonText, ToolbarBackground]
+ }
})
export class Navbar extends ToolbarBase {
private _bbIcon: string;
diff --git a/src/components/picker/picker-component.ts b/src/components/picker/picker-component.ts
index a60143db74..b3a2ad7da8 100644
--- a/src/components/picker/picker-component.ts
+++ b/src/components/picker/picker-component.ts
@@ -1,7 +1,9 @@
import { Component, ElementRef, EventEmitter, Input, HostListener, Output, QueryList, Renderer, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';
+import { NgClass, NgFor, NgIf } from '@angular/common';
import { DomSanitizationService } from '@angular/platform-browser';
import { Animation } from '../../animations/animation';
+import { Backdrop } from '../backdrop/backdrop';
import { cancelRaf, pointerCoord, raf } from '../../util/dom';
import { clamp, isNumber, isPresent, isString } from '../../util/util';
import { Config } from '../../config/config';
@@ -28,6 +30,7 @@ import { ViewController } from '../nav/view-controller';
{{col.suffix}}
`,
+ directives: [NgFor, NgIf],
host: {
'[style.min-width]': 'col.columnWidth',
'[class.picker-opts-left]': 'col.align=="left"',
@@ -363,10 +366,10 @@ export class PickerColumnCmp {
`,
+ directives: [Backdrop, NgClass, NgFor, PickerColumnCmp],
host: {
'role': 'dialog'
},
- directives: [PickerColumnCmp],
encapsulation: ViewEncapsulation.None,
})
export class PickerCmp {
diff --git a/src/components/popover/popover-component.ts b/src/components/popover/popover-component.ts
index 79d071bc48..8511564b2a 100644
--- a/src/components/popover/popover-component.ts
+++ b/src/components/popover/popover-component.ts
@@ -2,6 +2,7 @@ import { Component, ComponentResolver, ElementRef, HostListener, Renderer, ViewC
import { addSelector } from '../../config/bootstrap';
import { Animation } from '../../animations/animation';
+import { Backdrop } from '../backdrop/backdrop';
import { Config } from '../../config/config';
import { CSS, nativeRaf } from '../../util/dom';
import { isPresent, pascalCaseToDashCase } from '../../util/util';
@@ -27,7 +28,8 @@ import { ViewController } from '../nav/view-controller';
- `
+ `,
+ directives: [Backdrop]
})
export class PopoverCmp {
@ViewChild('viewport', {read: ViewContainerRef}) viewport: ViewContainerRef;
diff --git a/src/components/radio/radio-button.ts b/src/components/radio/radio-button.ts
index 286301befc..eec525b5cd 100644
--- a/src/components/radio/radio-button.ts
+++ b/src/components/radio/radio-button.ts
@@ -43,19 +43,20 @@ import { RadioGroup } from './radio-group';
*/
@Component({
selector: 'ion-radio',
- template:
- '' +
- '',
+ template: `
+
+
+ `,
host: {
'[class.radio-disabled]': '_disabled'
},
diff --git a/src/components/radio/radio-group.ts b/src/components/radio/radio-group.ts
index d37e7c92eb..f8afe3d0fe 100644
--- a/src/components/radio/radio-group.ts
+++ b/src/components/radio/radio-group.ts
@@ -5,7 +5,7 @@ import { ListHeader } from '../list/list';
import { isCheckedProperty } from '../../util/util';
import { RadioButton } from './radio-button';
-const RADIO_VALUE_ACCESSOR = new Provider(
+export const RADIO_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => RadioGroup), multi: true});
/**
diff --git a/src/components/range/range.ts b/src/components/range/range.ts
index 190b538e3c..e3a8c0217c 100644
--- a/src/components/range/range.ts
+++ b/src/components/range/range.ts
@@ -1,4 +1,5 @@
import { AfterViewInit, Component, ElementRef, EventEmitter, forwardRef, Input, Inject, OnDestroy, OnInit, Optional, Output, Provider, QueryList, Renderer, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core';
+import { NgFor, NgIf } from '@angular/common';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { clamp, isNumber, isPresent, isString, isTrueProperty } from '../../util/util';
@@ -9,7 +10,7 @@ import { Item } from '../item/item';
import { UIEventManager } from '../../util/ui-event-manager';
-const RANGE_VALUE_ACCESSOR = new Provider(
+export const RANGE_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Range), multi: true});
/**
@@ -17,9 +18,11 @@ const RANGE_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: '.range-knob-handle',
- template:
- '{{_val}}
' +
- '',
+ template: `
+ {{_val}}
+
+ `,
+ directives: [NgIf],
host: {
'[class.range-knob-pressed]': 'pressed',
'[class.range-knob-min]': '_val===range.min',
@@ -176,22 +179,23 @@ export class RangeKnob implements OnInit {
*/
@Component({
selector: 'ion-range',
- template:
- '' +
- '' +
- '
' +
- '
' +
- '
' +
- '
' +
- '
' +
- '
' +
- '',
+ template: `
+
+
+
+ `,
+ directives: [NgFor, NgIf, RangeKnob],
host: {
'[class.range-disabled]': '_disabled',
'[class.range-pressed]': '_pressed',
'[class.range-has-pin]': '_pin'
},
- directives: [RangeKnob],
providers: [RANGE_VALUE_ACCESSOR],
encapsulation: ViewEncapsulation.None,
})
diff --git a/src/components/refresher/refresher-content.ts b/src/components/refresher/refresher-content.ts
index fa709d048d..2774377f18 100644
--- a/src/components/refresher/refresher-content.ts
+++ b/src/components/refresher/refresher-content.ts
@@ -1,7 +1,10 @@
import { Component, Input, ViewEncapsulation } from '@angular/core';
+import { NgIf } from '@angular/common';
import { Config } from '../../config/config';
+import { Icon } from '../icon/icon';
import { Refresher } from './refresher';
+import { Spinner } from '../spinner/spinner';
/**
@@ -9,19 +12,21 @@ import { Refresher } from './refresher';
*/
@Component({
selector: 'ion-refresher-content',
- template:
- '' +
- '
' +
- '' +
- '
' +
- '
' +
- '
' +
- '' +
- '
' +
- '' +
- '
' +
- '
' +
- '
',
+ template: `
+
+
+ `,
+ directives: [Icon, NgIf, Spinner],
host: {
'[attr.state]': 'r.state'
},
diff --git a/src/components/searchbar/searchbar.ts b/src/components/searchbar/searchbar.ts
index 0dea6e8479..0596fb35e1 100644
--- a/src/components/searchbar/searchbar.ts
+++ b/src/components/searchbar/searchbar.ts
@@ -1,7 +1,8 @@
import { Component, Directive, ElementRef, EventEmitter, HostBinding, Input, Optional, Output, ViewChild, ViewEncapsulation } from '@angular/core';
-import { NgControl} from '@angular/forms';
+import { NgControl, NgModel } from '@angular/forms';
import { Config } from '../../config/config';
+import { Icon } from '../icon/icon';
import { isPresent } from '../../util/util';
import { Debouncer } from '../../util/debouncer';
@@ -27,12 +28,6 @@ import { Debouncer } from '../../util/debouncer';
*/
@Component({
selector: 'ion-searchbar',
- host: {
- '[class.searchbar-has-value]': '_value',
- '[class.searchbar-active]': '_isActive',
- '[class.searchbar-show-cancel]': 'showCancelButton',
- '[class.searchbar-left-aligned]': 'shouldAlignLeft()'
- },
template:
'' +
'
' +
'{{cancelButtonText}}',
+ directives: [Icon, NgModel],
+ host: {
+ '[class.searchbar-has-value]': '_value',
+ '[class.searchbar-active]': '_isActive',
+ '[class.searchbar-show-cancel]': 'showCancelButton',
+ '[class.searchbar-left-aligned]': 'shouldAlignLeft()'
+ },
encapsulation: ViewEncapsulation.None
})
export class Searchbar {
diff --git a/src/components/segment/segment.ts b/src/components/segment/segment.ts
index 1886b4121c..942ad4700f 100644
--- a/src/components/segment/segment.ts
+++ b/src/components/segment/segment.ts
@@ -42,9 +42,10 @@ import { isPresent, isTrueProperty } from '../../util/util';
*/
@Component({
selector: 'ion-segment-button',
- template:
- '' +
- '',
+ template: `
+
+
+ `,
host: {
'tappable': '',
'class': 'segment-button',
diff --git a/src/components/select/select.ts b/src/components/select/select.ts
index 9a1986c6e1..3525c145c9 100644
--- a/src/components/select/select.ts
+++ b/src/components/select/select.ts
@@ -1,4 +1,5 @@
import { AfterContentInit, Component, ContentChildren, ElementRef, EventEmitter, forwardRef, Input, HostListener, OnDestroy, Optional, Output, Provider, Renderer, QueryList, ViewEncapsulation } from '@angular/core';
+import { NgIf } from '@angular/common';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { ActionSheet } from '../action-sheet/action-sheet';
@@ -10,7 +11,7 @@ import { Item } from '../item/item';
import { NavController } from '../nav/nav-controller';
import { Option } from '../option/option';
-const SELECT_VALUE_ACCESSOR = new Provider(
+export const SELECT_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Select), multi: true});
@@ -116,19 +117,21 @@ const SELECT_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: 'ion-select',
- template:
- '{{placeholder}}
' +
- '{{_text}}
' +
- '' +
- '' +
- '',
+ template: `
+ {{placeholder}}
+ {{_text}}
+
+
+
+ `,
+ directives: [NgIf],
host: {
'[class.select-disabled]': '_disabled'
},
diff --git a/src/components/spinner/spinner.ts b/src/components/spinner/spinner.ts
index 55a61b7b87..eb6350f8c6 100644
--- a/src/components/spinner/spinner.ts
+++ b/src/components/spinner/spinner.ts
@@ -1,4 +1,5 @@
import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
+import { NgFor, NgStyle } from '@angular/common';
import { Config } from '../../config/config';
@@ -97,13 +98,15 @@ import { Config } from '../../config/config';
*/
@Component({
selector: 'ion-spinner',
- template:
- '' +
- '',
+ template: `
+
+
+ `,
+ directives: [NgFor, NgStyle],
host: {
'[class]': '_applied',
'[class.spinner-paused]': 'paused'
diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index b18e27c1bc..c528307cfb 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -1,8 +1,11 @@
import { Component, ElementRef, EventEmitter, Input, Output, Optional, Renderer, ViewChild, ViewContainerRef, ViewEncapsulation } from '@angular/core';
+import { NgClass, NgFor, NgIf } from '@angular/common';
import { App } from '../app/app';
+import { Badge } from '../badge/badge';
import { Config } from '../../config/config';
import { Content } from '../content/content';
+import { Icon } from '../icon/icon';
import { Ion } from '../ion';
import { isBlank, isTrueProperty } from '../../util/util';
import { nativeRaf } from '../../util/dom';
@@ -134,22 +137,20 @@ import { ViewController } from '../nav/view-controller';
*/
@Component({
selector: 'ion-tabs',
- template:
- '' +
- '' +
- '' +
- '{{t.tabTitle}}' +
- '{{t.tabBadge}}' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '',
- directives: [
- TabButton,
- TabHighlight
- ],
+ template: `
+
+
+
+ {{t.tabTitle}}
+ {{t.tabBadge}}
+
+
+
+
+
+
+ `,
+ directives: [Badge, Icon, NgClass, NgFor, NgIf, TabButton, TabHighlight],
encapsulation: ViewEncapsulation.None,
})
export class Tabs extends Ion {
diff --git a/src/components/toast/toast-component.ts b/src/components/toast/toast-component.ts
index ef21ab0aa2..34852212a4 100644
--- a/src/components/toast/toast-component.ts
+++ b/src/components/toast/toast-component.ts
@@ -1,4 +1,5 @@
import { AfterViewInit, Component, ElementRef, Renderer } from '@angular/core';
+import { NgIf } from '@angular/common';
import { Animation } from '../../animations/animation';
import { Config } from '../../config/config';
@@ -27,6 +28,7 @@ import { ViewController } from '../nav/view-controller';
`,
+ directives: [NgIf],
host: {
'role': 'dialog',
'[attr.aria-labelledby]': 'hdrId',
diff --git a/src/components/toggle/toggle.ts b/src/components/toggle/toggle.ts
index 0acd85c1c1..90926cd57c 100644
--- a/src/components/toggle/toggle.ts
+++ b/src/components/toggle/toggle.ts
@@ -8,7 +8,7 @@ import { pointerCoord } from '../../util/dom';
import { UIEventManager } from '../../util/ui-event-manager';
-const TOGGLE_VALUE_ACCESSOR = new Provider(
+export const TOGGLE_VALUE_ACCESSOR = new Provider(
NG_VALUE_ACCESSOR, {useExisting: forwardRef(() => Toggle), multi: true});
@@ -51,19 +51,20 @@ const TOGGLE_VALUE_ACCESSOR = new Provider(
*/
@Component({
selector: 'ion-toggle',
- template:
- '' +
- '' +
- '',
+ template: `
+
+
+
+ `,
host: {
'[class.toggle-disabled]': '_disabled'
},
diff --git a/src/components/toolbar/toolbar.ts b/src/components/toolbar/toolbar.ts
index 9e974877d9..189378573e 100644
--- a/src/components/toolbar/toolbar.ts
+++ b/src/components/toolbar/toolbar.ts
@@ -190,14 +190,15 @@ export class ToolbarBase extends Ion {
*/
@Component({
selector: 'ion-toolbar',
- template:
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '
',
+ template: `
+
+
+
+
+
+
+
+ `,
host: {
'class': 'toolbar',
'[class.statusbar-padding]': '_sbPadding'