i'm simply doing setting this:
app.config(['$routeProvider',function($routeProvider) {
$routeProvider
.when('/asd/:id/:slug',{
templateUrl:'views/home/index.html',
controller:'Home',
publicAccess:true,
sessionAccess:true
});
:id and :slug are dynamic params.
Now i would like to check if current url matches
that route (/asd/:id/:slug
)
for example the url : asd/5/it-is-a-slug
which is the simplest way?
i tryed this :
$rootScope.$on('$routeChangeStart', function(){
console.log($route.current);
});
but sometimes it returns nothing in console while switching page routes