Restrict route parameter with ng-route

0

How to restrict the character type sent per parameter in angularjs routes?

In the case below, the person could only enter numbers:

 $routeProvider
     .when('/atividade/:atividade/:secao/:edicao', {
                    templateUrl: PATH_DIR_PRO + "partials/angularjs_templates/quiz.html?v="+VERSION,
                    controller  : 'QuizController'
                }) 

It would look something like this:

/atividade/:atividade:\d+/:secao:\d+/:edicao:\d+
    
asked by anonymous 26.01.2018 / 16:14

0 answers