Skip to content

Commit 55dfd25

Browse files
committed
Merge branch 'decorator-inheritance'
2 parents 0a97cf2 + 404d977 commit 55dfd25

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

src/components/nav/nav.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Config } from '../../config/config';
55
import { DeepLinker } from '../../navigation/deep-linker';
66
import { DomController } from '../../platform/dom-controller';
77
import { GestureController } from '../../gestures/gesture-controller';
8-
import { isTrueProperty } from '../../util/util';
98
import { Keyboard } from '../../platform/keyboard';
109
import { NavController } from '../../navigation/nav-controller';
1110
import { NavControllerBase } from '../../navigation/nav-controller-base';
@@ -56,6 +55,7 @@ import { RootNode } from '../split-pane/split-pane';
5655
providers: [{provide: RootNode, useExisting: forwardRef(() => Nav) }]
5756
})
5857
export class Nav extends NavControllerBase implements AfterViewInit, RootNode {
58+
5959
private _root: any;
6060
private _hasInit: boolean = false;
6161

@@ -149,18 +149,6 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode {
149149
*/
150150
@Input() rootParams: any;
151151

152-
/**
153-
* @input {boolean} If true, swipe to go back is enabled.
154-
*/
155-
@Input()
156-
get swipeBackEnabled(): boolean {
157-
return this._sbEnabled;
158-
}
159-
set swipeBackEnabled(val: boolean) {
160-
this._sbEnabled = isTrueProperty(val);
161-
this._swipeBackCheck();
162-
}
163-
164152
/**
165153
* @hidden
166154
*/

src/components/segment/segment.ios.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ $segment-button-ios-toolbar-icon-line-height: 2.4rem !default;
129129
border-radius: 0 $segment-button-ios-border-radius $segment-button-ios-border-radius 0;
130130
}
131131
}
132+
132133
.segment-ios.segment-disabled {
133134
opacity: .4;
134135

src/components/tabs/tab.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,6 @@ export class Tab extends NavControllerBase {
233233
this._isShown = isTrueProperty(val);
234234
}
235235

236-
/**
237-
* @input {boolean} If true, swipe to go back is enabled.
238-
*/
239-
@Input()
240-
get swipeBackEnabled(): boolean {
241-
return this._sbEnabled;
242-
}
243-
set swipeBackEnabled(val: boolean) {
244-
this._sbEnabled = isTrueProperty(val);
245-
}
246-
247236
/**
248237
* @input {boolean} If true, hide the tabs on child pages.
249238
*/

src/navigation/nav-controller-base.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComponentRef, ComponentFactoryResolver, ElementRef, EventEmitter, NgZone, ReflectiveInjector, Renderer, ViewContainerRef } from '@angular/core';
1+
import { ComponentRef, Input, ComponentFactoryResolver, ElementRef, EventEmitter, NgZone, ReflectiveInjector, Renderer, ViewContainerRef } from '@angular/core';
22

33
import { AnimationOptions } from '../animations/animation';
44
import { App } from '../components/app/app';
@@ -9,7 +9,7 @@ import { setZIndex } from './nav-util';
99
import { DeepLinker } from './deep-linker';
1010
import { DomController } from '../platform/dom-controller';
1111
import { GestureController } from '../gestures/gesture-controller';
12-
import { isBlank, isNumber, isPresent, assert, removeArrayItem } from '../util/util';
12+
import { isBlank, isNumber, isPresent, isTrueProperty, assert, removeArrayItem } from '../util/util';
1313
import { isViewController, ViewController } from './view-controller';
1414
import { Ion } from '../components/ion';
1515
import { Keyboard } from '../platform/keyboard';
@@ -49,6 +49,15 @@ export class NavControllerBase extends Ion implements NavController {
4949

5050
id: string;
5151

52+
@Input()
53+
get swipeBackEnabled(): boolean {
54+
return this._sbEnabled;
55+
}
56+
set swipeBackEnabled(val: boolean) {
57+
this._sbEnabled = isTrueProperty(val);
58+
this._swipeBackCheck();
59+
}
60+
5261
constructor(
5362
public parent: any,
5463
public _app: App,

src/navigation/nav-controller.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,11 @@ export abstract class NavController {
403403
*/
404404
config: Config;
405405

406+
/**
407+
* @input {boolean} If true, swipe to go back is enabled.
408+
*/
409+
swipeBackEnabled: boolean;
410+
406411
/**
407412
* Push a new component onto the current navigation stack. Pass any aditional information
408413
* along as an object. This additional information is accessible through NavParams

0 commit comments

Comments
 (0)