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);