Simple route not working

I have the following route:

But when i try to open /questionnary/5 i get a big fat ‘cannot get questionnary/5’

What’s obvious that i am missing here ?

Thanks

routes = [{
path: '/',
url: './index.html',

},
{
path: ‘/questionnary/:id/’,

on: {
  pageAfterIn: function (e, page) {
    // do something after page gets into the view
  },
  pageInit: function (e, page) {
    // do something when page initialized
  },
},
async: function (routeTo, routeFrom, resolve, reject) {
  // Router instance
  var router = this;
  // App instance
  var app = router.app;
  // Show Preloader 
  app.preloader.show();
  // User ID from request
  var userId = routeTo.params.userId;

  // Hide Preloader
  app.preloader.hide();

  var stuff;
  $.get('./pages/dummy.html', function (response) {
    console.log(response);
    p1 = response;
    // Resolve route to load page
    resolve({
      componentUrl: './pages/questionnary.html',
    }, {
      context: {
        title: "Title Here",
        id: $route.params.id,
        tab1: p1,
        tab2: p1,
        tab3: p1,
      }
    });
  });
}

},

You are using v2, right? Pay attention to trailing slash in the path, must be the same on link href

Yes V2. Tried trailing slash, no success.

The links is : <li><a class="external" href="/questionnary/{{idEnquete}}/">{{title}}</a></li>

Remove “external” class from link

1 Like

duh, that was it ! Thanks !