Your views are just Vue components. Varie makes a suggestion on how to organize your components with layouts and directory structures.
[{.info} To learn more about components go to Vue's Documentation.]
By default we provide a public layout, by adding more you are able to use different layouts.
+-- views
+-- layouts
./Public.vue
[{.info} To learn more about layouts read the routing documentation.]
We suggest making areas folders for your site, which allows you to keep a tidy folder structure and also can keep component folders inside of those.
+-- views
+-- Profile
./index.vue
+-- components
./NewPasswordForm.vue
./ProfileImageUploader.vue
As you can see your can create sub component's in this manner that are not necessarily reusable components but components to keep your code tidy.
To inject dependencies into your components by using the $inject
property in your Vue Component.
export default Vue.extend({
$inject: ["DocumentationService"]
computed : {
menu() {
return this.documentationService.getMenu();
}
}
});