Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Application Entry #169

Open
pothuraju-dev opened this issue Jul 31, 2024 · 0 comments
Open

Docs: Application Entry #169

pothuraju-dev opened this issue Jul 31, 2024 · 0 comments

Comments

@pothuraju-dev
Copy link

Guide > Nuxt Concepts > Application Entry

Section 1:

Brief about app.vue and its importance in Nuxt framework.

Section 2:

  • Explanation of sample code in .template/file/app.vue
  • Code will have a greeting message "Hello Nuxter, welcome to Nuxt tutorials"
  • In coming tutorials this code will be split using pages and component concepts

Section 3: Challenge

  • Create a header with the text "Nuxt Tutorial"
  • A greeting message "Good Morning, Nuxter"

Application Entry

To give you the full control of your application, Nuxt allows you to define your own application entry app.vue to start minimal (optional).

app.vue serves as the foundational component for your Nuxt application. Its usage depends on the type of application you're building.

For SPAs, app.vue is essential. It acts as a container for all the content of your application. Think of it as the main framework that holds together all the different parts of your SPA.

While not strictly necessary, app.vue can be beneficial for multi page application. You can use it to establish a consistent layout or include global components that should be present across all pages. This helps maintain a unified look and feel for your application.

If your project is a simple landing page without multiple routes, app.vue can be the sole entry point. In this case, it directly defines the content of your landing page without the need for additional routing.

For the simplest of applications, a basic app.vue might look like this:

<template>
    <h1>Hello World!</h1>
</template>

This renders a simple "Hello World!" message across every page of your application.

Challenge

Try to modify the app.vue` by creating an h1 tag with the text "Hello Nuxters!" and below create an h2 tag with the text "Welcome to Nuxt Tutorials".


@antfu any suggestions or changes would be a great help to go further. I hope I am going in right direction if not please guide me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant