K
K
klinnov2016-09-25 14:27:15
JavaScript
klinnov, 2016-09-25 14:27:15

How to get a parameter from a nested route?

Hello!
There is a main route. There are 5 nested routes to it. Nested routes have a parameter ($stateParams.form_id) that needs to be pulled into the parent one.
How to do it (without $rootScope etc.)?
The code:

.state('forms', {
            url: "/forms/:company_id/"
}

.state('forms.view_1', {
            url: "1/view/:form_id"
}

Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
klinnov, 2016-09-25
@klinnov

I decided. Everything is already in $state.params

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question