i use $window.open()
to open the same tab. the problem is that $sessionStorage
object is the same in the new tab as in the original tab. i understand that it's because of top-level browsing (read about it in thes question How to prevent sessionStorage being inherited when using target="_blank"/window.open() to open a new window/tab? and in here https://www.webdirections.org/blog/webstorage-persistent-client-side-data-storage/). what i am looking for is a way to open a new tab from inside the old tab with a new empty $sessionStorage
(only for the new tab).
old tab
$sessionStorage.text = "aaaaaaa";
$window.open("http://sameTab/different/state");
new tab
$sessionStorage.text = "aaaaaaa";