Updated function params in ionic history service (#13936)

* Updated function params in ionic history service

* updated test for ionic typings
This commit is contained in:
kwiateusz
2017-01-12 17:44:58 +01:00
committed by Sheetal Nandi
parent 1e2b81261a
commit 3a6791b20e
2 changed files with 6 additions and 3 deletions

6
ionic/index.d.ts vendored
View File

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

View File

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