Simple integration of Vue.js web components and .NET standard MVC
IVueComponentinterface is used for building C# objects that can be rendered into Vue web components.
IVueComponent.RenderComponentextension method will render the HTML for the Vue web component when a class implements the
- Various parts of the
IVueComponentinterface have been isolated and have their own extension methods now, in cases where only partial rendering of the component is needed.
- Configuration transform and
VueConfigutility class are used to easily define where Vue script files live and what components are available in configuration files. - Web.Config section
<vueConfig>for .NET Framework 4.6.2+ - vuesettings.config for dotnet core projects.
VueDotNet.RenderVueScriptsmethod can be used to easily define where Vue scripts should be rendered
- See example projects for basic configuration and implementation examples.
- Clone this repository
- Make sure node.js is installed, and dotnet core 2.2
- Open command line to vue-dotnet-wc-example-ts
npm installfollowed by
npm run buildand verify no errors in console. Read that project's readme.md for more options on the vue side.
- Open the solution file in Visual Studio
- Restore, build and run the Vue.Net.Examples.Core. Read that project's readme.md for more options on the dotnet side.
- If you see the Vue.js logo and the default hello world, everything is working!