diff --git a/gulpfile.js b/gulpfile.js
index 129383e917..a5c4e75a8a 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -885,8 +885,7 @@ gulp.task("tslint", function() {
var tslint = require("gulp-tslint");
gulp.src([
'ionic/**/*.ts',
- '!ionic/components/*/test/**/*',
- '!ionic/util/test/*'
+ '!ionic/**/test/**/*',
]).pipe(tslint())
.pipe(tslint.report('verbose'));
});
diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts
index 530d911247..b9a0592894 100644
--- a/ionic/components/app/app.ts
+++ b/ionic/components/app/app.ts
@@ -12,7 +12,7 @@ import {rafFrames} from '../../util/dom';
*/
@Injectable()
export class IonicApp {
- private _cmps: {[id: string] : any} = {};
+ private _cmps: {[id: string]: any} = {};
private _disTime: number = 0;
private _scrollTime: number = 0;
private _title: string = '';
@@ -65,7 +65,7 @@ export class IonicApp {
* it will automatically enable the app again. It's basically a fallback incase
* something goes wrong during a transition and the app wasn't re-enabled correctly.
*/
- setEnabled(isEnabled: boolean, duration: number=700) {
+ setEnabled(isEnabled: boolean, duration: number = 700) {
this._disTime = (isEnabled ? 0 : Date.now() + duration);
if (duration > 32 || isEnabled) {
diff --git a/ionic/components/badge/badge.ts b/ionic/components/badge/badge.ts
index 348cd998e7..8ee3362f7a 100644
--- a/ionic/components/badge/badge.ts
+++ b/ionic/components/badge/badge.ts
@@ -38,7 +38,7 @@ export class Badge {
attrName = elementAttrs[i].name;
// Ignore attributes item-left, item-right
- if (attrName.indexOf('item') == -1) {
+ if (attrName.indexOf('item') === -1) {
this._setClass(attrName);
}
}
diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts
index 6c0da4c4c3..dfc7e6a948 100644
--- a/ionic/components/content/content.ts
+++ b/ionic/components/content/content.ts
@@ -168,7 +168,7 @@ export class Content extends Ion {
return () => {
if (!this.scrollElement) { return; }
this.scrollElement.removeEventListener(type, handler);
- }
+ };
}
/**
diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts
index 540299a217..916df841e7 100644
--- a/ionic/components/icon/icon.ts
+++ b/ionic/components/icon/icon.ts
@@ -150,7 +150,7 @@ export class Icon {
css += this._name;
}
- if (this.mode == 'ios' && !this.isActive) {
+ if (this.mode === 'ios' && !this.isActive) {
css += '-outline';
}
diff --git a/ionic/components/infinite-scroll/infinite-scroll-content.ts b/ionic/components/infinite-scroll/infinite-scroll-content.ts
index 3b00cc0534..2883920ba3 100644
--- a/ionic/components/infinite-scroll/infinite-scroll-content.ts
+++ b/ionic/components/infinite-scroll/infinite-scroll-content.ts
@@ -1,4 +1,4 @@
-import {Component, Input} from 'angular2/core'
+import {Component, Input} from 'angular2/core';
import {NgIf} from 'angular2/common';
import {Config} from '../../config/config';
diff --git a/ionic/components/infinite-scroll/infinite-scroll.ts b/ionic/components/infinite-scroll/infinite-scroll.ts
index 458322e52c..f1b57d2797 100644
--- a/ionic/components/infinite-scroll/infinite-scroll.ts
+++ b/ionic/components/infinite-scroll/infinite-scroll.ts
@@ -172,7 +172,7 @@ export class InfiniteScroll {
if (this._thrPc) {
reloadY += (reloadY * this._thrPc);
} else {
- reloadY += this._thrPx
+ reloadY += this._thrPx;
}
let distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - reloadY;
diff --git a/ionic/components/input/input-base.ts b/ionic/components/input/input-base.ts
index d6e8ceaf59..8c9d91d3c2 100644
--- a/ionic/components/input/input-base.ts
+++ b/ionic/components/input/input-base.ts
@@ -398,7 +398,7 @@ export class InputBase {
* @private
*/
clearTextInput() {
- console.debug("Should clear input");
+ console.debug('Should clear input');
}
/**
@@ -578,7 +578,6 @@ export class InputBase {
const SCROLL_ASSIST_SPEED = 0.3;
function getScrollAssistDuration(distanceToScroll) {
- //return 3000;
distanceToScroll = Math.abs(distanceToScroll);
let duration = distanceToScroll / SCROLL_ASSIST_SPEED;
return Math.min(400, Math.max(150, duration));
diff --git a/ionic/components/item/item-sliding-gesture.ts b/ionic/components/item/item-sliding-gesture.ts
index 56b587aa37..f7067121ef 100644
--- a/ionic/components/item/item-sliding-gesture.ts
+++ b/ionic/components/item/item-sliding-gesture.ts
@@ -13,7 +13,7 @@ export class ItemSlidingGesture extends DragGesture {
onMouseOut;
preventDrag: boolean = false;
dragEnded: boolean = true;
-
+
constructor(public list: List, public listEle: HTMLElement) {
super(listEle, {
direction: 'x',
@@ -196,7 +196,7 @@ export class ItemSlidingGesture extends DragGesture {
if (openAmount) {
isItemActive(itemContainerEle, true);
this.on('tap', this.onTap);
-
+
} else {
this.off('tap', this.onTap);
}
diff --git a/ionic/components/item/item.ts b/ionic/components/item/item.ts
index 96745a2c2a..97f381e7c6 100644
--- a/ionic/components/item/item.ts
+++ b/ionic/components/item/item.ts
@@ -47,7 +47,7 @@ import {Label} from '../label/label';
'
' +
'' +
'' +
- ''+
+ '' +
'' +
'' +
'
' +
diff --git a/ionic/components/list/list.ts b/ionic/components/list/list.ts
index 971d9acb75..ca2eb1b298 100644
--- a/ionic/components/list/list.ts
+++ b/ionic/components/list/list.ts
@@ -115,7 +115,7 @@ export class List extends Ion {
export class ListHeader {
private _id: string;
- constructor(private _renderer: Renderer, private _elementRef: ElementRef, @Attribute('id') id:string) {
+ constructor(private _renderer: Renderer, private _elementRef: ElementRef, @Attribute('id') id: string) {
this._id = id;
}
diff --git a/ionic/components/menu/menu-controller.ts b/ionic/components/menu/menu-controller.ts
index df22a92bd3..8525d932a3 100644
--- a/ionic/components/menu/menu-controller.ts
+++ b/ionic/components/menu/menu-controller.ts
@@ -326,4 +326,4 @@ export class MenuController {
}
-let menuTypes:{ [name: string]: new(...args: any[]) => MenuType } = {};
+let menuTypes: { [name: string]: new(...args: any[]) => MenuType } = {};
diff --git a/ionic/components/menu/menu-toggle.ts b/ionic/components/menu/menu-toggle.ts
index be9b1321f0..f90a2bca3e 100644
--- a/ionic/components/menu/menu-toggle.ts
+++ b/ionic/components/menu/menu-toggle.ts
@@ -30,7 +30,7 @@ import {MenuController} from './menu-controller';
selector: '[menuToggle]',
host: {
'[hidden]': 'isHidden',
- 'menuToggle': '' //ensures the attr is there for css when using [menuToggle]
+ 'menuToggle': '' // ensures the attr is there for css when using [menuToggle]
}
})
export class MenuToggle {
@@ -77,7 +77,7 @@ export class MenuToggle {
if (menu) {
// this is not the root view, so see if this menu
// is configured to still be enabled if it's not the root view
- return !menu.persistent;
+ return !menu.persistent;
}
}
return false;
diff --git a/ionic/components/menu/menu-types.ts b/ionic/components/menu/menu-types.ts
index eb4e05be5f..f86c134496 100644
--- a/ionic/components/menu/menu-types.ts
+++ b/ionic/components/menu/menu-types.ts
@@ -65,7 +65,7 @@ class MenuRevealType extends MenuType {
constructor(menu) {
super();
- let openedX = (menu.width() * (menu.side == 'right' ? -1 : 1)) + 'px';
+ let openedX = (menu.width() * (menu.side === 'right' ? -1 : 1)) + 'px';
this.ani
.easing('ease')
@@ -95,10 +95,11 @@ class MenuPushType extends MenuType {
let contentOpenedX, menuClosedX, menuOpenedX;
- if (menu.side == 'right') {
+ if (menu.side === 'right') {
contentOpenedX = -menu.width() + 'px';
menuOpenedX = (menu._platform.width() - menu.width()) + 'px';
menuClosedX = menu._platform.width() + 'px';
+
} else {
contentOpenedX = menu.width() + 'px';
menuOpenedX = '0px';
@@ -132,7 +133,7 @@ class MenuOverlayType extends MenuType {
.duration(250);
let closedX, openedX;
- if (menu.side == 'right') {
+ if (menu.side === 'right') {
// right side
closedX = menu._platform.width() + 'px';
openedX = (menu._platform.width() - menu.width() - 8) + 'px';
diff --git a/ionic/components/menu/menu.ts b/ionic/components/menu/menu.ts
index af5bddb6bc..dbd863df19 100644
--- a/ionic/components/menu/menu.ts
+++ b/ionic/components/menu/menu.ts
@@ -163,7 +163,7 @@ export class Menu extends Ion {
// register listeners if this menu is enabled
// check if more than one menu is on the same side
- let hasEnabledSameSideMenu = self._menuCtrl.getMenus().some(m => {
+ let hasEnabledSameSideMenu = self._menuCtrl.getMenus().some(m => {
return m.side === self.side && m.enabled;
});
if (hasEnabledSameSideMenu) {
diff --git a/ionic/components/modal/modal.ts b/ionic/components/modal/modal.ts
index af51119cfe..9603777c1b 100644
--- a/ionic/components/modal/modal.ts
+++ b/ionic/components/modal/modal.ts
@@ -103,7 +103,7 @@ import {Transition, TransitionOptions} from '../../transitions/transition';
*/
export class Modal extends ViewController {
- constructor(componentType, data={}) {
+ constructor(componentType, data = {}) {
super(componentType, data);
this.viewType = 'modal';
this.isOverlay = true;
@@ -121,7 +121,7 @@ export class Modal extends ViewController {
* @param {any} componentType Modal
* @param {object} data Modal options
*/
- static create(componentType, data={}) {
+ static create(componentType, data = {}) {
return new Modal(componentType, data);
}
diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts
index f12ccc0117..7fb6d1c717 100644
--- a/ionic/components/nav/nav-controller.ts
+++ b/ionic/components/nav/nav-controller.ts
@@ -708,7 +708,7 @@ export class NavController extends Ion {
startIndex = this._views.length - 1;
} else if (startIndex < 0 || startIndex >= this._views.length) {
- return Promise.reject("remove index out of range");
+ return Promise.reject('remove index out of range');
}
if (isBlank(opts)) {
diff --git a/ionic/components/nav/nav-params.ts b/ionic/components/nav/nav-params.ts
index 40580c0434..6e62399958 100644
--- a/ionic/components/nav/nav-params.ts
+++ b/ionic/components/nav/nav-params.ts
@@ -25,7 +25,7 @@
* @see {@link ../NavPush/ NavPush API Docs}
*/
export class NavParams {
-
+
/**
* @private
* @param {TODO} data TODO
diff --git a/ionic/components/nav/nav-push.ts b/ionic/components/nav/nav-push.ts
index 7fc327832f..cb14485601 100644
--- a/ionic/components/nav/nav-push.ts
+++ b/ionic/components/nav/nav-push.ts
@@ -78,7 +78,7 @@ export class NavPush {
if (this.navPush instanceof Array) {
if (this.navPush.length > 2) {
- throw 'Too many [navPush] arguments, expects [View, { params }]'
+ throw 'Too many [navPush] arguments, expects [View, { params }]';
}
destination = this.navPush[0];
params = this.navPush[1] || this.navParams;
@@ -88,7 +88,7 @@ export class NavPush {
params = this.navParams;
}
- if (typeof destination === "string") {
+ if (typeof destination === 'string') {
destination = this.registry.get(destination);
}
diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts
index b808f57dcb..ef7451a3c5 100644
--- a/ionic/components/nav/nav.ts
+++ b/ionic/components/nav/nav.ts
@@ -174,8 +174,8 @@ export class Nav extends NavController {
this.push(this._root);
}
}
-
- @ViewChild(Portal)
+
+ @ViewChild(Portal)
private set _navPortal(val: Portal) {
this.setPortal(val);
}
diff --git a/ionic/components/nav/view-controller.ts b/ionic/components/nav/view-controller.ts
index 30b1f11e7a..3207fa2bb0 100644
--- a/ionic/components/nav/view-controller.ts
+++ b/ionic/components/nav/view-controller.ts
@@ -94,7 +94,7 @@ export class ViewController {
constructor(public componentType?: Type, data?: any) {
// passed in data could be NavParams, but all we care about is its data object
- this.data = (data instanceof NavParams ? data.data : isPresent(data) ? data : {});
+ this.data = (data instanceof NavParams ? data.data : (isPresent(data) ? data : {}));
}
subscribe(generatorOrNext?: any): any {
@@ -531,7 +531,7 @@ function ctrlFn(viewCtrl: ViewController, fnName: string) {
if (viewCtrl.instance && viewCtrl.instance[fnName]) {
try {
viewCtrl.instance[fnName]();
- } catch(e) {
+ } catch (e) {
console.error(viewCtrl.name + ' ' + fnName + ': ' + e.message);
}
}
diff --git a/ionic/components/navbar/navbar.ts b/ionic/components/navbar/navbar.ts
index 4f4dce9aed..ca8bc02208 100644
--- a/ionic/components/navbar/navbar.ts
+++ b/ionic/components/navbar/navbar.ts
@@ -202,7 +202,7 @@ export class Navbar extends ToolbarBase {
didEnter() {
try {
this._app.setTitle(this.getTitleText());
- } catch(e) {
+ } catch (e) {
console.error(e);
}
}
diff --git a/ionic/components/radio/radio-group.ts b/ionic/components/radio/radio-group.ts
index 8b30ca72a2..5e8771ba5a 100644
--- a/ionic/components/radio/radio-group.ts
+++ b/ionic/components/radio/radio-group.ts
@@ -186,7 +186,7 @@ export class RadioGroup {
remove(button: RadioButton) {
let index = this._btns.indexOf(button);
if (index > -1) {
- if (button.value == this.value) {
+ if (button.value === this.value) {
this.value = null;
}
this._btns.splice(index, 1);
diff --git a/ionic/components/refresher/refresher-content.ts b/ionic/components/refresher/refresher-content.ts
index 3c021bec2e..7c9767379b 100644
--- a/ionic/components/refresher/refresher-content.ts
+++ b/ionic/components/refresher/refresher-content.ts
@@ -1,4 +1,4 @@
-import {Component, Input} from 'angular2/core'
+import {Component, Input} from 'angular2/core';
import {NgIf} from 'angular2/common';
import {Config} from '../../config/config';
diff --git a/ionic/components/refresher/refresher.ts b/ionic/components/refresher/refresher.ts
index b197006c25..214e91f170 100644
--- a/ionic/components/refresher/refresher.ts
+++ b/ionic/components/refresher/refresher.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, EventEmitter, Host, Input, Output, NgZone} from 'angular2/core'
+import {Directive, ElementRef, EventEmitter, Host, Input, Output, NgZone} from 'angular2/core';
import {NgIf, NgClass} from 'angular2/common';
import {Content} from '../content/content';
@@ -411,7 +411,7 @@ export class Refresher {
this.state = STATE_REFRESHING;
// place the content in a hangout position while it thinks
- this._setCss(this.pullMin,( this.snapbackDuration + 'ms'), true, '');
+ this._setCss(this.pullMin, (this.snapbackDuration + 'ms'), true, '');
// emit "refresh" because it was pulled down far enough
// and they let go to begin refreshing
diff --git a/ionic/components/scroll/scroll.ts b/ionic/components/scroll/scroll.ts
index 18d3867d2d..d7af55e5d8 100644
--- a/ionic/components/scroll/scroll.ts
+++ b/ionic/components/scroll/scroll.ts
@@ -77,13 +77,13 @@ export class Scroll extends Ion {
* undefined if the scroll element doesn't exist.
*/
addScrollEventListener(handler) {
- if(!this.scrollElement) { return; }
+ if (!this.scrollElement) { return; }
this.scrollElement.addEventListener('scroll', handler);
return () => {
this.scrollElement.removeEventListener('scroll', handler);
- }
+ };
}
}
diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts
index 798548c19d..c81705ce8c 100644
--- a/ionic/components/searchbar/searchbar.ts
+++ b/ionic/components/searchbar/searchbar.ts
@@ -67,7 +67,7 @@ export class SearchbarInput {
directives: [FORM_DIRECTIVES, NgIf, NgClass, Icon, Button, SearchbarInput]
})
export class Searchbar extends Ion {
- private _tmr: number;
+ private _tmr: any;
/**
* @private
@@ -191,7 +191,7 @@ export class Searchbar extends Ion {
if (this.ngModel) this.value = this.ngModel;
this.onChange(this.value);
- this.shouldLeftAlign = this.value && this.value.trim() != '';
+ this.shouldLeftAlign = this.value && this.value.trim() !== '';
// Using querySelector instead of searchbarInput because at this point it doesn't exist
this.inputElement = this._elementRef.nativeElement.querySelector('.searchbar-input');
@@ -222,8 +222,8 @@ export class Searchbar extends Ion {
if (this.mode !== 'ios') return;
if (this.shouldLeftAlign) {
- this.inputElement.removeAttribute("style");
- this.searchIconElement.removeAttribute("style");
+ this.inputElement.removeAttribute('style');
+ this.searchIconElement.removeAttribute('style');
} else {
this.addElementLeft();
}
@@ -245,11 +245,11 @@ export class Searchbar extends Ion {
tempSpan.remove();
// Set the input padding left
- let inputLeft = "calc(50% - " + (textWidth / 2) + "px)";
+ let inputLeft = 'calc(50% - ' + (textWidth / 2) + 'px)';
this.inputElement.style.paddingLeft = inputLeft;
// Set the icon margin left
- let iconLeft = "calc(50% - " + ((textWidth / 2) + 30) + "px)";
+ let iconLeft = 'calc(50% - ' + ((textWidth / 2) + 30) + 'px)';
this.searchIconElement.style.marginLeft = iconLeft;
}
@@ -288,7 +288,7 @@ export class Searchbar extends Ion {
inputBlurred() {
// blurInput determines if it should blur
// if we are clearing the input we still want to stay focused in the input
- if (this.blurInput == false) {
+ if (this.blurInput === false) {
this.searchbarInput._elementRef.nativeElement.focus();
this.blurInput = true;
return;
@@ -296,7 +296,7 @@ export class Searchbar extends Ion {
this.blur.emit(this);
this.isFocused = false;
- this.shouldLeftAlign = this.value && this.value.trim() != '';
+ this.shouldLeftAlign = this.value && this.value.trim() !== '';
this.setElementLeft();
}
@@ -338,7 +338,7 @@ export class Searchbar extends Ion {
/**
* @private
*/
- onChange = (_:any) => {};
+ onChange = (_: any) => {};
/**
* @private
@@ -349,7 +349,7 @@ export class Searchbar extends Ion {
* @private
* Set the function to be called when the control receives a change event.
*/
- registerOnChange(fn:(_:any) => {}):void {
+ registerOnChange(fn: (_: any) => {}): void {
this.onChange = fn;
}
@@ -357,7 +357,7 @@ export class Searchbar extends Ion {
* @private
* Set the function to be called when the control receives a touch event.
*/
- registerOnTouched(fn:() => {}):void {
+ registerOnTouched(fn: () => {}): void {
this.onTouched = fn;
}
}
diff --git a/ionic/components/select/select.ts b/ionic/components/select/select.ts
index 52d459491b..7e30f2de97 100644
--- a/ionic/components/select/select.ts
+++ b/ionic/components/select/select.ts
@@ -233,7 +233,7 @@ export class Select {
label: input.text,
value: input.value,
checked: input.checked
- }
+ };
});
// create the alert instance from our built up alertOptions
diff --git a/ionic/components/show-hide-when/show-hide-when.ts b/ionic/components/show-hide-when/show-hide-when.ts
index e0b1474284..3e396b3374 100644
--- a/ionic/components/show-hide-when/show-hide-when.ts
+++ b/ionic/components/show-hide-when/show-hide-when.ts
@@ -1,4 +1,4 @@
-import {Directive, Attribute, NgZone} from 'angular2/core'
+import {Directive, Attribute, NgZone} from 'angular2/core';
import {Platform} from '../../platform/platform';
@@ -42,12 +42,12 @@ export class DisplayWhen {
orientation(): boolean {
for (let i = 0; i < this.conditions.length; i++) {
- if (this.conditions[i] == 'portrait') {
+ if (this.conditions[i] === 'portrait') {
this.isMatch = this.platform.isPortrait();
return true;
}
- if (this.conditions[i] == 'landscape') {
+ if (this.conditions[i] === 'landscape') {
this.isMatch = this.platform.isLandscape();
return true;
}
diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts
index 09ca09e051..18a013be16 100644
--- a/ionic/components/slides/slides.ts
+++ b/ionic/components/slides/slides.ts
@@ -7,7 +7,7 @@ import {Gesture} from '../../gestures/gesture';
import {DragGesture} from '../../gestures/drag-gesture';
import {dom} from '../../util';
import {CSS} from '../../util/dom';
-import {debounce, isTrueProperty, defaults} from '../../util/util'
+import {debounce, isTrueProperty, defaults} from '../../util/util';
import {Swiper} from './swiper-widget';
import {Scroll} from '../scroll/scroll';
@@ -151,7 +151,7 @@ export class Slides extends Ion {
zoomable: HTMLElement,
zoomableWidth: number,
zoomableHeight: number
- }
+ };
/**
* @input {boolean} Whether the slide should show the pager or not
@@ -356,13 +356,13 @@ export class Slides extends Ion {
this.zoomGesture.on('pinch', (e) => {
this.scale = Math.max(1, Math.min(last_scale * e.scale, 10));
console.debug('Scaling', this.scale);
- this.zoomElement.style[CSS.transform] = 'scale(' + this.scale + ')'
+ this.zoomElement.style[CSS.transform] = 'scale(' + this.scale + ')';
zoomRect = this.zoomElement.getBoundingClientRect();
});
- this.zoomGesture.on('pinchend', (e) => {
- //last_scale = Math.max(1, Math.min(last_scale * e.scale, 10));
+ this.zoomGesture.on('pinchend', () => {
+ // last_scale = Math.max(1, Math.min(last_scale * e.scale, 10));
if (this.scale > this.maxScale) {
let za = new Animation(this.zoomElement)
.duration(this.zoomDuration)
@@ -438,31 +438,31 @@ export class Slides extends Ion {
za.add(zi);
if (this.scale > 1) {
- // Zoom out
+ // zoom out
- //zw.fromTo('translateX', posX + 'px', '0px');
- //zw.fromTo('translateY', posY + 'px', '0px');
+ // zw.fromTo('translateX', posX + 'px', '0px');
+ // zw.fromTo('translateY', posY + 'px', '0px');
zi.from('scale', this.scale);
zi.to('scale', 1);
za.play();
- //posX = 0;
- //posY = 0;
+ // posX = 0;
+ // posY = 0;
this.scale = 1;
} else {
- // Zoom in
+ // zoom in
- //zw.fromTo('translateX', posX + 'px', tx + 'px');
- //zw.fromTo('translateY', posY + 'px', ty + 'px');
+ // zw.fromTo('translateX', posX + 'px', tx + 'px');
+ // zw.fromTo('translateY', posY + 'px', ty + 'px');
zi.from('scale', this.scale);
zi.to('scale', this.maxScale);
za.play();
- //posX = tx;
- //posY = ty;
+ // posX = tx;
+ // posY = ty;
this.scale = this.maxScale;
}
@@ -485,7 +485,7 @@ export class Slides extends Ion {
onTouchStart(e) {
console.debug('Touch start', e);
- //TODO: Support mice as well
+ // TODO: Support mice as well
let target = ((dom.closest(e.target, '.slide').children[0] as HTMLElement).children[0] as HTMLElement);
@@ -502,11 +502,10 @@ export class Slides extends Ion {
zoomable: target,
zoomableWidth: target.offsetWidth,
zoomableHeight: target.offsetHeight
- }
+ };
console.debug('Target', this.touch.target);
- //TODO: android prevent default
-
+ // TODO: android prevent default
}
/**
@@ -521,9 +520,9 @@ export class Slides extends Ion {
let zoomableScaledWidth = this.touch.zoomableWidth * this.scale;
let zoomableScaledHeight = this.touch.zoomableHeight * this.scale;
- let x1 = Math.min((this.viewportWidth / 2) - zoomableScaledWidth/2, 0)
+ let x1 = Math.min((this.viewportWidth / 2) - zoomableScaledWidth / 2, 0);
let x2 = -x1;
- let y1 = Math.min((this.viewportHeight / 2) - zoomableScaledHeight/2, 0)
+ let y1 = Math.min((this.viewportHeight / 2) - zoomableScaledHeight / 2, 0);
let y2 = -y1;
console.debug('BOUNDS', x1, x2, y1, y2);
@@ -534,24 +533,24 @@ export class Slides extends Ion {
console.debug('PAN', e);
- // Move image
+ // move image
this.touch.x = this.touch.deltaX + this.touch.lastX;
this.touch.y = this.touch.deltaY + this.touch.lastY;
if (this.touch.x < x1) {
console.debug('OUT ON LEFT');
}
- if (this.touch.x > x2 ){
+ if (this.touch.x > x2 ) {
console.debug('OUT ON RIGHT');
}
if (this.touch.x > this.viewportWidth) {
- // Too far on the left side, let the event bubble up (to enable slider on edges, for example)
+ // too far on the left side, let the event bubble up (to enable slider on edges, for example)
} else if (-this.touch.x > this.viewportWidth) {
- // Too far on the right side, let the event bubble up (to enable slider on edges, for example)
+ // too far on the right side, let the event bubble up (to enable slider on edges, for example)
} else {
console.debug('TRANSFORM', this.touch.x, this.touch.y, this.touch.target);
- //this.touch.target.style[CSS.transform] = 'translateX(' + this.touch.x + 'px) translateY(' + this.touch.y + 'px)';
+ // this.touch.target.style[CSS.transform] = 'translateX(' + this.touch.x + 'px) translateY(' + this.touch.y + 'px)';
this.touch.target.style[CSS.transform] = 'translateX(' + this.touch.x + 'px) translateY(' + this.touch.y + 'px)';
e.preventDefault();
e.stopPropagation();
diff --git a/ionic/components/slides/swiper-widget.d.ts b/ionic/components/slides/swiper-widget.d.ts
index 97750f3fb2..46ba753043 100644
--- a/ionic/components/slides/swiper-widget.d.ts
+++ b/ionic/components/slides/swiper-widget.d.ts
@@ -1,12 +1,11 @@
+
export declare class Swiper {
constructor(container: HTMLElement, params: any);
slides: Array;
activeIndex: number;
isEnd: boolean;
isBeginning: boolean;
-
- update():any;
- slideNext():any;
- slidePrev():any;
-
+ update(): any;
+ slideNext(): any;
+ slidePrev(): any;
}
diff --git a/ionic/components/spinner/spinner.ts b/ionic/components/spinner/spinner.ts
index 1a300d7402..102a30e9b5 100644
--- a/ionic/components/spinner/spinner.ts
+++ b/ionic/components/spinner/spinner.ts
@@ -185,7 +185,7 @@ export class Spinner {
}
_loadEle(spinner: any, index: number, total: number) {
- let duration = this._dur || spinner.dur
+ let duration = this._dur || spinner.dur;
let data = spinner.fn(duration, index, total);
data.style.animationDuration = duration + 'ms';
return data;
@@ -206,7 +206,7 @@ const SPINNERS = {
transform: 'rotate(' + (30 * index + (index < 6 ? 180 : -180)) + 'deg)',
animationDelay: -(dur - ((dur / total) * index)) + 'ms'
}
- }
+ };
}
},
@@ -221,7 +221,7 @@ const SPINNERS = {
transform: 'rotate(' + (30 * index + (index < 6 ? 180 : -180)) + 'deg)',
animationDelay: -(dur - ((dur / total) * index)) + 'ms'
}
- }
+ };
}
},
@@ -236,7 +236,7 @@ const SPINNERS = {
left: 9 * Math.cos(2 * Math.PI * index / total),
animationDelay: -(dur - ((dur / total) * index)) + 'ms'
}
- }
+ };
}
},
@@ -251,7 +251,7 @@ const SPINNERS = {
left: 9 * Math.cos(2 * Math.PI * index / total),
animationDelay: -(dur - ((dur / total) * index)) + 'ms'
}
- }
+ };
}
},
@@ -262,7 +262,7 @@ const SPINNERS = {
return {
r: 26,
style: {}
- }
+ };
}
},
@@ -276,7 +276,7 @@ const SPINNERS = {
left: (9 - (9 * index)),
animationDelay: -(110 * index) + 'ms'
}
- }
+ };
}
}
diff --git a/ionic/components/tabs/tab-button.ts b/ionic/components/tabs/tab-button.ts
index 33fd420d0c..be12b8b0c4 100644
--- a/ionic/components/tabs/tab-button.ts
+++ b/ionic/components/tabs/tab-button.ts
@@ -45,7 +45,7 @@ export class TabButton extends Ion {
this._layout = this.tab.parent.tabbarLayout || this._layout;
this.hasTitle = !!this.tab.tabTitle;
- this.hasIcon = !!this.tab.tabIcon && this._layout != 'icon-hide';
+ this.hasIcon = !!this.tab.tabIcon && this._layout !== 'icon-hide';
this.hasTitleOnly = (this.hasTitle && !this.hasIcon);
this.hasIconOnly = (this.hasIcon && !this.hasTitle);
this.hasBadge = !!this.tab.tabBadge;
diff --git a/ionic/components/tabs/tab-highlight.ts b/ionic/components/tabs/tab-highlight.ts
index 181934c325..b65014d147 100644
--- a/ionic/components/tabs/tab-highlight.ts
+++ b/ionic/components/tabs/tab-highlight.ts
@@ -10,7 +10,7 @@ import {rafFrames} from '../../util/dom';
})
export class TabHighlight {
private _init: boolean;
-
+
constructor(private _elementRef: ElementRef) {}
select(tab) {
diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts
index 3ebe4acedf..74a381f42b 100644
--- a/ionic/components/tabs/tabs.ts
+++ b/ionic/components/tabs/tabs.ts
@@ -132,7 +132,7 @@ export class Tabs extends Ion {
/**
* @private
*/
- parent: any
+ parent: any;
constructor(
@Optional() viewCtrl: ViewController,
@@ -171,7 +171,7 @@ export class Tabs extends Ion {
this._setConfig('tabbarIcons', 'top');
if (this.tabbarIcons) {
- console.warn("DEPRECATION WARNING: 'tabbarIcons' is no longer supported and will be removed in next major release. Use 'tabbarLayout' instead. Available values: 'icon-top', 'icon-left', 'icon-right', 'icon-bottom', 'icon-hide', 'title-hide'.");
+ console.warn('DEPRECATION WARNING: "tabbarIcons" is no longer supported and will be removed in next major release. Use "tabbarLayout" instead. Available values: "icon-top", "icon-left", "icon-right", "icon-bottom", "icon-hide", "title-hide".');
}
if (this._useHighlight) {
@@ -342,7 +342,7 @@ export class Tabs extends Ion {
// Otherwise, if the page we're on is not our real root, reset it to our
// default root type
- if (tab.root != active.componentType) {
+ if (tab.root !== active.componentType) {
return tab.setRoot(tab.root);
}
diff --git a/ionic/components/tap-click/tap-click.ts b/ionic/components/tap-click/tap-click.ts
index c95c949057..24b51e4761 100644
--- a/ionic/components/tap-click/tap-click.ts
+++ b/ionic/components/tap-click/tap-click.ts
@@ -27,10 +27,10 @@ export class TapClick {
) {
let self = this;
- if (config.get('activator') == 'ripple') {
+ if (config.get('activator') === 'ripple') {
self.activator = new RippleActivator(app, config, zone);
- } else if (config.get('activator') == 'highlight') {
+ } else if (config.get('activator') === 'highlight') {
self.activator = new Activator(app, config, zone);
}
diff --git a/ionic/components/virtual-scroll/virtual-util.ts b/ionic/components/virtual-scroll/virtual-util.ts
index fd4cbcf4dc..f2f503214e 100644
--- a/ionic/components/virtual-scroll/virtual-util.ts
+++ b/ionic/components/virtual-scroll/virtual-util.ts
@@ -227,10 +227,10 @@ export function populateNodeData(startCellIndex: number, endCellIndex: number, v
};
totalNodes = nodes.push(availableNode);
- //console.debug(`VirtrualScroll, new node, tmpl ${cell.tmpl}, height ${cell.height}`);
+ // console.debug(`VirtrualScroll, new node, tmpl ${cell.tmpl}, height ${cell.height}`);
}
- //console.debug(`node was cell ${availableNode.cell} but is now ${cellIndex}, was top: ${cell.top}`);
+ // console.debug(`node was cell ${availableNode.cell} but is now ${cellIndex}, was top: ${cell.top}`);
// assign who's the new cell index for this node
availableNode.cell = cellIndex;
@@ -238,8 +238,8 @@ export function populateNodeData(startCellIndex: number, endCellIndex: number, v
// apply the cell's data to this node
availableNode.view.setLocal('\$implicit', cell.data || records[cell.record]);
availableNode.view.setLocal('index', cellIndex);
- availableNode.view.setLocal('even', (cellIndex % 2 == 0));
- availableNode.view.setLocal('odd', (cellIndex % 2 == 1));
+ availableNode.view.setLocal('even', (cellIndex % 2 === 0));
+ availableNode.view.setLocal('odd', (cellIndex % 2 === 1));
availableNode.hasChanges = true;
availableNode.lastTransform = null;
madeChanges = true;
@@ -504,7 +504,7 @@ export function adjustRendered(cells: VirtualCell[], data: VirtualData) {
}
}
- //console.log(`adjustRendered topCell: ${data.topCell}, bottomCell: ${data.bottomCell}, cellsRenderHeight: ${cellsRenderHeight}, data.renderHeight: ${data.renderHeight}`);
+ // console.log(`adjustRendered topCell: ${data.topCell}, bottomCell: ${data.bottomCell}, cellsRenderHeight: ${cellsRenderHeight}, data.renderHeight: ${data.renderHeight}`);
}
diff --git a/ionic/index.ts b/ionic/index.ts
index a34ad6c054..65c7635b7f 100644
--- a/ionic/index.ts
+++ b/ionic/index.ts
@@ -1,31 +1,31 @@
-export * from './config/bootstrap'
-export * from './config/config'
-export * from './config/directives'
+export * from './config/bootstrap';
+export * from './config/config';
+export * from './config/directives';
-export * from './decorators/app'
-export * from './decorators/page'
+export * from './decorators/app';
+export * from './decorators/page';
-export * from './components'
+export * from './components';
-export * from './platform/platform'
-export * from './platform/storage'
+export * from './platform/platform';
+export * from './platform/storage';
-export * from './util/click-block'
-export * from './util/events'
-export * from './util/keyboard'
-export * from './util/form'
+export * from './util/click-block';
+export * from './util/events';
+export * from './util/keyboard';
+export * from './util/form';
-export * from './animations/animation'
-export * from './transitions/transition'
+export * from './animations/animation';
+export * from './transitions/transition';
-export * from './translation/translate'
-export * from './translation/translate_pipe'
+export * from './translation/translate';
+export * from './translation/translate_pipe';
// these modules don't export anything
-import './config/modes'
-import './platform/registry'
-import './animations/builtins'
-import './transitions/transition-ios'
-import './transitions/transition-md'
-import './transitions/transition-wp'
+import './config/modes';
+import './platform/registry';
+import './animations/builtins';
+import './transitions/transition-ios';
+import './transitions/transition-md';
+import './transitions/transition-wp';
diff --git a/ionic/platform/storage/sql.ts b/ionic/platform/storage/sql.ts
index 8cb8669fb0..f0d28de01c 100644
--- a/ionic/platform/storage/sql.ts
+++ b/ionic/platform/storage/sql.ts
@@ -109,7 +109,7 @@ export class SqlStorage extends StorageEngine {
} catch (err) {
reject({ err: err });
}
- })
+ });
}
/**
diff --git a/ionic/platform/storage/storage.ts b/ionic/platform/storage/storage.ts
index a63f83cb2b..a907166a56 100644
--- a/ionic/platform/storage/storage.ts
+++ b/ionic/platform/storage/storage.ts
@@ -4,7 +4,7 @@
*
* For most cases, we recommend the SqlStorage system as it will store
* data in a file in the app's sandbox. LocalStorage should ONLY be used
- * for temporary data as it may be "cleaned up" by the operation system
+ * for temporary data as it may be 'cleaned up' by the operation system
* during low disk space situations.
*/
/**
@@ -68,18 +68,18 @@ export class StorageEngine {
constructor(options = {}) { }
get(key: string): Promise {
- throw Error("get() not implemented for this storage engine");
+ throw Error('get() not implemented for this storage engine');
}
set(key: string, value: any): Promise {
- throw Error("set() not implemented for this storage engine");
+ throw Error('set() not implemented for this storage engine');
}
remove(key: string): Promise {
- throw Error("remove() not implemented for this storage engine");
+ throw Error('remove() not implemented for this storage engine');
}
query(query: string, params?: any): Promise {
- throw Error("query() not implemented for this storage engine");
+ throw Error('query() not implemented for this storage engine');
}
clear(): Promise {
- throw Error("clear() not implemented for this storage engine");
+ throw Error('clear() not implemented for this storage engine');
}
}
diff --git a/ionic/util.ts b/ionic/util.ts
index 5139b33d3d..008a46d8a4 100644
--- a/ionic/util.ts
+++ b/ionic/util.ts
@@ -1,4 +1,3 @@
-import * as domUtil from './util/dom'
-export const dom = domUtil
-
-export * from './util/util'
+import * as domUtil from './util/dom';
+export const dom = domUtil;
+export * from './util/util';