3

How would I go about integrating a Vue JS folder that has index.html, main.css, main.js and vue.js into a .Net MVC project? I'm not too familiar with .Net or how it really works but I can tell where the CSS files go into the designated folder and the traditional JS file into scripts folder but how about vue.js where data, methods, and computed properties exist along with html that has Vue syntax.

Also, It's not an entire site, it's just a small web app that will on lay within a single URL and not jump from page to page. If I insert HTML with Vue syntax into the cshtml file will that compile it properly with the Vue script in the file?

0

2 Answers 2

3

I created this template that combines .NET MVC with Vue.js. You can use the entire Vue ecosystem but if you don't want it on any page you can just opt out.

GitHub: https://github.com/danijelh/aspnetcore-vue-typescript-template

Medium: https://medium.com/@danijelhdev/multi-page-net-core-with-vue-js-typescript-vuex-vue-router-bulma-sass-and-webpack-4-efc7de83fea4

Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

-1

The best option for you (if you use ASP.NET Core) to install and use template from this repository https://github.com/MarkPieszak/aspnetcore-Vue-starter

Look at \Views\Home\Index.cshtml in this solution. Vue scripts are injected there.

1 Comment

While this info may be useful, the question is about MVC architecture and not Core.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.