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,
}
});
});
}
},