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

@ -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