I want to extract data from current URL and use it in controller. For example I have this url:
app.dev/backend/surveys/2
Bits t
Better would have been generate url like
app.dev/backend?type=surveys&id=2
and then use
var type=$location.search().type; var id=$location.search().id;
and inject $location in controller.