I'm trying to get a state todo-detail({id: id}). I'm using $state.get(), but don't know, how to pass {id: id} arguments to it.
1 Answer
State need be retrived by name. If you want to know params 'id' of state. Do this:
$state.get('todo-detail').params
// return {id:id}.
In other way you can get all states with
var arrayStates = $state.get();
then find states expected in this array
1 Comment
Boris Burkov
Sorry, my question contained a false assumption. I wanted to generate a hyperlink to a state, but parameters are applied to a state at the moment of hyperlink generation, not at the moment of state retrieval.