I use @uirouter/angular in my project and have a number of states like:
export let MAIN_STATES: Ng2StateDeclaration[] = [
{ name: 'state1', url: '/state1', component: State1Component },
{ name: 'state2', url: '/state2', component: State2Component },
...
];
Naturally in app.component I have
<ui-view></ui-view>
which loads appropriate state component depending on path. The problem is that in @uirouter doc and examples there is a lot info about resolve functions, transitions etc related to state entering configuration, but I can't find how to access transition (particulary I need url) from state component itself (State1Component for example). It's stated that params can be accessed just by name:
@Input param1;
I've tried to do it with url, but it's undefined. How to do it?