UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

30 lines (23 loc) 705 B
// eslint-disable-next-line no-undef sap.ui.define([ "sap/ui/core/mvc/Controller", "sap/ui/core/routing/History", "sap/ui/core/UIComponent" ], function(Controller, History, UIComponent) { "use strict"; return Controller.extend("sap.ui.demo.nav.controller.BaseController", { getRouter : function () { return UIComponent.getRouterFor(this); }, onNavBack: function () { var oHistory, sPreviousHash; oHistory = History.getInstance(); sPreviousHash = oHistory.getPreviousHash(); if (sPreviousHash !== undefined) { window.history.go(-1); } else { this.getRouter().navTo("appHome", {}, true /*no history*/); } } }); });