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
Answer the question
In order to leave comments, you need to log in
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 a Question
731 491 924 answers to any question