title: How to pass params into route handler pre - hapi.js
body: <p>I am using route handler pre. I want to pass permission from router so my idea is check whether that logged in user has the permission or not? When I pass parm directly it throws an error.</p>
  
  <p><strong>Routing</strong></p>
  
  <pre><code> server.route({ 
       method: 'GET', 
       path: '/getUser', 
       config: {
           handler: User.getUser, 
           pre: [
                { method: Activity.checkVal(1) }
           ]
       }
   });
  </code></pre>
  
  <p><strong>Function Call</strong></p>
  
  <pre><code>exports.checkVal = function(parm, request, reply) {
      Jwt.verify(request.headers.authorization.split(' ')[1],  Config.key.privateKey, function(err, decoded) {    
          var permissions = permissionsSet();
          if(permissions.indexOf(request.pre.val) &gt; -1)
              return reply().continue();
          else
              reply(Boom.forbidden( "You don't have permission." ));
      });
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Error</strong></p>
  
  <blockquote>
    <p>Error: Invalid routeConfig options (getUser)</p>
  </blockquote>
  
  <p>Is there anyway to pass paramters into route?</p>