We can use the history.back() method which loads the previous URL in the history list. It functions the same as clicking the Back button in the browser.
Here is the code snippet to show it's usage :,
<html>
<header ng-controller="menuController">
<h1 class="ui-title">Send tip</h1>
</header>
<section class="midArea">
<div class="form-horizontal ui-content">
<p id="newback" ng-click="backButton()"> Back </p>
</div>
</section>
</html>
Now this is the code to be included in your js :
$scope.backButton= function(){
window.plugins.nativepagetransitions.slide( {
"direction": 'left',
"href" : window.history.back()
} );
};
I have used a native page transition plugin for animated transitions between the views. You can simply use the window.history.back method.
0 Comment(s)