From 3a6791b20e7070666b1f64769e06f0832f1174ea Mon Sep 17 00:00:00 2001 From: kwiateusz Date: Thu, 12 Jan 2017 17:44:58 +0100 Subject: [PATCH] Updated function params in ionic history service (#13936) * Updated function params in ionic history service * updated test for ionic typings --- ionic/index.d.ts | 6 +++--- ionic/ionic-tests.ts | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ionic/index.d.ts b/ionic/index.d.ts index 6b651b598f..4dfb7f60b6 100644 --- a/ionic/index.d.ts +++ b/ionic/index.d.ts @@ -201,14 +201,14 @@ declare namespace ionic { interface IonicHistoryService { viewHistory(): any; - currentView(): any; + currentView(view?: any): any; currentHistoryId(): string; currentTitle(val?: string): string; - backView(): any; + backView(view?: any): any; backTitle(): string; - forwardView(): any; + forwardView(view?: any): any; currentStateName(): string; diff --git a/ionic/ionic-tests.ts b/ionic/ionic-tests.ts index 2aa89b929a..89631663d5 100644 --- a/ionic/ionic-tests.ts +++ b/ionic/ionic-tests.ts @@ -167,12 +167,15 @@ class IonicTestController { var viewHistory = this.$ionicHistory.viewHistory(); var currentView = this.$ionicHistory.currentView(); + this.$ionicHistory.currentView({viewId: 1}); var currentHistoryId: string = this.$ionicHistory.currentHistoryId(); this.$ionicHistory.currentTitle("currentTitle"); var currentTitle: string = this.$ionicHistory.currentTitle(); var backView = this.$ionicHistory.backView(); + this.$ionicHistory.backView({viewId: 1}); var backTitle: string = this.$ionicHistory.backTitle(); var forwardView = this.$ionicHistory.forwardView(); + this.$ionicHistory.forwardView({viewId: 1}); var currentStateName: string = this.$ionicHistory.currentStateName(); this.$ionicHistory.goBack(5);