Reputation: 855
I want to create a static header, with some links that change a vue app
like a SPA
. I know how to do this within the main app, but how can it be achieved outside of it, in a static header for example?
App being the main vue
instance.
<body>
<div id="header">
<a href="" id="link_to_change_app_view"></a>
</div>
<div id="#app"></div>
</body>
Upvotes: 0
Views: 147
Reputation: 6812
As claimed in the comments you can simply put your static header inside your app
<div id="#app">
<!-- static -->
<div id="header">
<router-link to="" id="link_to_change_app_view" />
</div>
<!-- dynamic -->
<router-view></router-view>
</div>
Upvotes: 1