Class sap.ui.core.routing.HistoryModule: sap/ui/core/routing/History
Constructor Summary
new sap.ui.core.routing.History(oHashChanger)Used to determine the sap.ui.core.HistoryDirection of the current or a future navigation, done with a sap.ui.core.routing.Router or sap.ui.core.routing.HashChanger.
Method Summary
getDirection(sNewHash?)Determines what the navigation direction for a newly given hash would be It will say Unknown if there is a history foo - bar (current history) - foo If you now ask for the direction of the hash "foo" you get Unknown because it might be backwards or forwards.
getPreviousHash()gets the previous hash in the history - if the last direction was Unknown or there was no navigation yet, undefined will be returned
Constructor Detail
new sap.ui.core.routing.History(oHashChanger)
Used to determine the sap.ui.core.HistoryDirection of the current or a future navigation, done with a sap.ui.core.routing.Router or sap.ui.core.routing.HashChanger.
ATTENTION: this class will not be accurate if someone does hash-replacement without the named classes above If you are manipulating the hash directly this class is not supported anymore.
Parameters:
{sap.ui.core.routing.HashChanger} | oHashChanger | required, without a HashChanger this class cannot work. The class needs to be aware of the hash-changes. |
Method Detail
sap.ui.core.routing.History.getInstance(): sap.ui.core.routing.History
Returns:
{sap.ui.core.routing.History} | a global singleton that gets created as soon as the sap.ui.core.routing.History is required |
getDirection(sNewHash?): sap.ui.core.routing.HistoryDirection
Determines what the navigation direction for a newly given hash would be It will say Unknown if there is a history foo - bar (current history) - foo If you now ask for the direction of the hash "foo" you get Unknown because it might be backwards or forwards. For hash replacements, the history stack will be replaced at this position for the history.
Parameters:
{string} | sNewHash? | optional, if this parameter is not passed the last hashChange is taken. |
Returns:
{sap.ui.core.routing.HistoryDirection} | or undefined, if no navigation has taken place yet. |