To create a new project based on this template using degit:
npx degit imsamtar/template svelte-app
cd svelte-app
Note that you will need to have Node.js installed.
Register Routes
import registerRoutes from "./helper/registerRoutes";
const routes = {
'/': {
component: Dashboard,
beforeload: (ctx, routeOptions) => {
if(!auth){
return false;
}
},
onload: (ctx, routeOptions) => {
fetchData();
}
},
}
registerRoutes(routes);