Bob Bob - 1 year ago 76
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.

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download