Merge branch 'decorator-inheritance'

This commit is contained in:
Manuel Mtz-Almeida
2017-04-05 20:30:05 +02:00
5 changed files with 18 additions and 26 deletions

View File

@ -5,7 +5,6 @@ import { Config } from '../../config/config';
import { DeepLinker } from '../../navigation/deep-linker';
import { DomController } from '../../platform/dom-controller';
import { GestureController } from '../../gestures/gesture-controller';
import { isTrueProperty } from '../../util/util';
import { Keyboard } from '../../platform/keyboard';
import { NavController } from '../../navigation/nav-controller';
import { NavControllerBase } from '../../navigation/nav-controller-base';
@ -56,6 +55,7 @@ import { RootNode } from '../split-pane/split-pane';
providers: [{provide: RootNode, useExisting: forwardRef(() => Nav) }]
})
export class Nav extends NavControllerBase implements AfterViewInit, RootNode {
private _root: any;
private _hasInit: boolean = false;
@ -149,18 +149,6 @@ export class Nav extends NavControllerBase implements AfterViewInit, RootNode {
*/
@Input() rootParams: any;
/**
* @input {boolean} If true, swipe to go back is enabled.
*/
@Input()
get swipeBackEnabled(): boolean {
return this._sbEnabled;
}
set swipeBackEnabled(val: boolean) {
this._sbEnabled = isTrueProperty(val);
this._swipeBackCheck();
}
/**
* @hidden
*/

View File

@ -129,6 +129,7 @@ $segment-button-ios-toolbar-icon-line-height: 2.4rem !default;
border-radius: 0 $segment-button-ios-border-radius $segment-button-ios-border-radius 0;
}
}
.segment-ios.segment-disabled {
opacity: .4;

View File

@ -233,17 +233,6 @@ export class Tab extends NavControllerBase {
this._isShown = isTrueProperty(val);
}
/**
* @input {boolean} If true, swipe to go back is enabled.
*/
@Input()
get swipeBackEnabled(): boolean {
return this._sbEnabled;
}
set swipeBackEnabled(val: boolean) {
this._sbEnabled = isTrueProperty(val);
}
/**
* @input {boolean} If true, hide the tabs on child pages.
*/

View File

@ -1,4 +1,4 @@
import { ComponentRef, ComponentFactoryResolver, ElementRef, EventEmitter, NgZone, ReflectiveInjector, Renderer, ViewContainerRef } from '@angular/core';
import { ComponentRef, Input, ComponentFactoryResolver, ElementRef, EventEmitter, NgZone, ReflectiveInjector, Renderer, ViewContainerRef } from '@angular/core';
import { AnimationOptions } from '../animations/animation';
import { App } from '../components/app/app';
@ -9,7 +9,7 @@ import { setZIndex } from './nav-util';
import { DeepLinker } from './deep-linker';
import { DomController } from '../platform/dom-controller';
import { GestureController } from '../gestures/gesture-controller';
import { isBlank, isNumber, isPresent, assert, removeArrayItem } from '../util/util';
import { isBlank, isNumber, isPresent, isTrueProperty, assert, removeArrayItem } from '../util/util';
import { isViewController, ViewController } from './view-controller';
import { Ion } from '../components/ion';
import { Keyboard } from '../platform/keyboard';
@ -49,6 +49,15 @@ export class NavControllerBase extends Ion implements NavController {
id: string;
@Input()
get swipeBackEnabled(): boolean {
return this._sbEnabled;
}
set swipeBackEnabled(val: boolean) {
this._sbEnabled = isTrueProperty(val);
this._swipeBackCheck();
}
constructor(
public parent: any,
public _app: App,

View File

@ -403,6 +403,11 @@ export abstract class NavController {
*/
config: Config;
/**
* @input {boolean} If true, swipe to go back is enabled.
*/
swipeBackEnabled: boolean;
/**
* Push a new component onto the current navigation stack. Pass any aditional information
* along as an object. This additional information is accessible through NavParams