2
About
I have a switch that takes care of the activation of my menus from their address on the site.
switch($location.path()){
case '/perfil':
$scope.menuAtivo.perfil = 'active';
break;
case '/perfil/editar/1':
$scope.menuAtivo.perfil = 'active';
break;
}
Problem
When he accesses the '/profile/edit/1' I want him to take any number where there is '1' because my url is '/profile/edit/:id', I tried using regex but I was not very successful. Would anyone have any idea?