Bob Bob - 9 months ago 27
AngularJS Question

Angular-ui-router: how to pass parameters to $state.get?

I'm trying to get a state

todo-detail({id: id})
. I'm using
, but don't know, how to pass
{id: id}
arguments to it.


State need be retrived by name. If you want to know params 'id' of state. Do this:

// return {id:id}.

In other way you can get all states with

var arrayStates = $state.get();

then find states expected in this array