I think this could be a common question, but I didn't find my answer, so that's the reason I am asking this. I am sorry if I am being repetitive.
I have a page with some categories. And each category has some category as its children. And, the user can click in this categories and the $scope.categories will change with those children, until we have no children anymore.
But, when the user clicks in a category to show its children, I want to change the URL, to make a permalink for the visible category at the time.
I tried to use $location, but $location does not change my absURL, it just set a anchor at the end of the URL, like '/path#category_slug'. I want to change to '/path/category_slug'. The reason is that I want to index those URLs in search engines.
So, if the user entry in '/path/category_slug', I will change $scope.categories based in the category_slug.
My question is, what is the best options to do this?