i\'m simply doing setting this:
app.config([\'$routeProvider\',function($routeProvider) {
$routeProvider
.when(\'/asd/:id/:slug\',{
templateUrl:\'vie
You can try something like this:
$routeProvider.when('/asd/:id/:slug', {
templateUrl: '/views/template.html',
controller: 'YourController',
resolve: {
data: ['$route', 'SecurityFactory',
function ($route, SecurityFactory) {
var id= parseInt($route.current.params.id, 10);
var slug= $route.current.params.slug;
SecurityFactory.checkParams(id, slug);
}
]
}
});
Then inside the SecurityFactory you can check the validity of the params. For example with RegExp.