Looking for guidance on integrating Vue JS with an existing MVC Project that is currently using Nuget Package.
Below approach has been attempted:
<h3>VueJS 2 in ASP.NET MVC 5</h3>
<div id="aboutPage">
{ { message }}
</div>
<script>
var aboutPage = new Vue({
el: '#aboutPage',
data: {
message: 'Hello Vue! in About Page'
}
});
</script>
Question:
- Do we need any additional packages like webpack or gulp, considering that we already have the bundle configuration of MVC?
2. How can we organize separate files or layouts for each view such as:
Separating the service call (for calling a web API from the client side)
Isolating the template file.
Where to write methods or logic in JavaScript.
If anyone has an example architecture for MVC with VueJS including - controllers, views, services, and Vue JS files, it would be greatly appreciated.
Thank you very much!