diff --git a/docs/assets/vuejsexample1.gif b/docs/assets/vuejsexample1.gif new file mode 100644 index 0000000..379f228 Binary files /dev/null and b/docs/assets/vuejsexample1.gif differ diff --git a/docs/web-dev/index.md b/docs/web-dev/index.md new file mode 100644 index 0000000..aca8b46 --- /dev/null +++ b/docs/web-dev/index.md @@ -0,0 +1,6 @@ +--- +layout: default +title: Web Development +nav_order: 3 +has_children: true +--- \ No newline at end of file diff --git a/docs/web-dev/simple-vue-spa-in-asp-dotnet-core.md b/docs/web-dev/simple-vue-spa-in-asp-dotnet-core.md new file mode 100644 index 0000000..adada50 --- /dev/null +++ b/docs/web-dev/simple-vue-spa-in-asp-dotnet-core.md @@ -0,0 +1,150 @@ +--- +layout: post +parent: Web Development +nav_order: 1 +title: "Creating a reactive SPA simply within an ASP.Net Core web app with Vue.js" +date: 2021-07-12 21:42:57 +0100 +categories: vue dotnet core asp +--- + +# {{page.title}} + +_{{page.date}}_ + + + +In this post, I will cover how you can quickly and easily use Vue.js to make a reactive 'SPA' within ASP.Net Core. This is a slightly dirty way to do things, but for rapid prototyping or a simple project it does the job just fine without any unnecessary complications. By 'SPA' I mean a Single Page Application, except without any navigation as that's handled by the underlying ASP.Net Core application, as is the API called by Vue.js methods. + +In the `
` tags of your Razor page/view, you'll need to include a reference to Vue.js, for example via a CDN. + +`` + +At the bottom of your Razor page/view, you'll need to include a ` +``` + +To hook this into the DOM, just add the element identifier to an element, for example `