I
I
Ian B2015-05-23 19:12:09
HTML
Ian B, 2015-05-23 19:12:09

Angularjs and getting a variable?

There is an api controller
There is a url /id/4
Route provider /id/:id
We need to get that id somehow
Please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Talanov, 2015-05-23
@noobback3

In the controller where you want to get this id, you need to insert $routeParams as a dependency, and then you will get the id like this - $routeParams.id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question