0

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 1

1

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

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.