Angularjs url rewriting and get variables values

Hi experts,

In my site i was getting the url variables values this way:
// url ->
$scope.topics = $['topics'];
$scope.months = $['distri'];

Open in new window

But now were turning the url into "pretty urls" with htaccess like this: ""
How can i get the values now in Angularjs? :\

I tried to understand better the ngRoute.. but i don't know if that helps in anyway in my case.. and the documentation of ngRoute it's kind of poor or maybe it's just me, i don't know...

Thx in advanced,
Who is Participating?
Mark BullockQA Engineer IIICommented:
Try this
$scope.topics = $location.path().split("/")[2]
$scope.months = $location.path().split("/")[3]

Open in new window

Maybe :$routeParams
you need to set html5mode to true also :$locationProvider

but I'm not sure you need ngRoute because it's for a single page application
that mean you load only part of your page
justaphaseAuthor Commented:
Amazing Mark!

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.