Starting the development of an SPA is an out-of-the-box solution; there is no need to add any new configuration.
So let's start adding a new page to our application. Open Terminal (macOS or Linux) or the Command Prompt/PowerShell (Windows) and execute the following command:
> quasar new page About
Quasar-CLI will automatically create the Vue page for us. We need to add the reference to the page in the router file, and the page will be available on the application:
- To do it, we need to open the routes.js file in the src/router folder, and add the About page:
const routes = [
{
path: '/',
component: () => import('layouts/MainLayout.vue'),
children: [
{ path: '', name: 'home', component: () =>
import('pages/Index.vue') },
{ path: 'about', name: 'about', component: () =>
import('pages/About.vue') },
],
},
...