I was able to solve my problem but I do not think it's the best way!
Based on the response of Sergio and Rafael I created an algorithm:
When accessed via URL in the node I created the route that receives these parameters and saves the id of them as follows:
router.get('/:nomeDaPessoa?/:ServicoDaPessoa?', function(req, res){
var nome = req.params.nomeDaPessoa;
var servico = req.params.ServicoDaPessoa;
serviceController.getByUrl(nome, servico, function (data){
req.session.serviceUrl = data.data[0].servico_id;
req.session.professionalUrl = data.data[0].profissional_id;
res.sendfile(FRONTEND_PATH + '/views/index.html');
});
});
In the angled front end I created the route to bring the correct view:
.state('service', {
url: '/:prof/:service',
templateUrl: function ($stateParams){
return '/views/detail.html';
},
controller: 'DetailController'
});
And in detailController is valid if it is coming from the click on the interface or via URL, so I go to the node and get the id's that are in the session:
if($rootScope.service && $rootScope.service.id){ //clicou em um servico na interface, nesse caso já tenho o id dos elementos!
$scope.getDetailService($rootScope.service.id);
} else {
Service.getSession(function(data){ //Vai ao node e pega o req.session
$scope.getDetailService(data.servico_id);
});
}
Well as I said I think it's not the best way but solve my problem! if someone else has a better solution let me know! valew