The entry point to my application is an URL with an unknown parameter value, e.g.:
http://www.host.com/key/25
and my simplified configuration looks like this:
$stateProvider.state('home', {
url: "/key/:key",
component: 'home'
}).state('sitenotice', {
url: "/sitenotice/",
component: 'sitenotice'
});
I try to navigate to "sitenotice" and back to "main" in the index.html with:
<html ng-app="myApp">
...
<div ui-view></div>
<a ui-sref="sitenotice">site notice</a>
<a ui-sref="home">home</a>
</html>
It is not working, because I don't pass the key-Parameter to the state "home". I have no idea how to access the initial value. Or can it be cached somehow? Is it possible to do that just with ui-router, I don't use a root-controller yet.
I use angular 1.5.8 and angular-ui-router 1.0.0-beta.3.