Rendering pages in a Vue app
In the last lesson, we set up the Vue Router plugin and provided configuration for our home route.
In this lesson, we'll render the output of the router within our app.
RouterView component
When the Vue Router plugin was installed, a global component RouterView
is registered. This component is used to output the router content wherever it is placed.
So let's add this component to our index.html file where we previously extracted the home page content:
Click to load comments...