I am having request page with below tags.
<p>This page demonstrates
<span class="text-danger">nested</span> views. </p>
<a ui-sref=".additem" class="btn btn-danger">Add Item sref</a>
<a ui-sref="cloneitem" class="btn btn-primary">Clone Items</a>
<input type="text"/>
and I type something in the textbox "Sample text"
If I click Clone Items it will redirect to clone.html and the content
<a ui-sref="back" class="btn btn-danger">Back to Request Form</a>
<a ui-sref="clone" class="btn btn-primary">Clone</a>
If I click back it is showing request page but the text box is cleared.
I have added the below in app.js
routerApp.run(
['$rootScope', '$state', '$stateParams',
function ($rootScope, $state, $stateParams) {
$rootScope.$state = $state;
$rootScope.$stateParams = $stateParams;
}
]);
But I am not sure how to maintain state using sref and how to pass parameters.