Skip to main content

Implement ASP.NET Core SPA template features in an Angular 6 app

Earlier, I posted about creating an angular 6 based app with VS 2017. It’s a pure Angular 6 app and doesn’t use features comes with the ASP.NET Core SPA template. At the time of writing this post, default ASP.NET Core SPA template for angular points to angular 5. The SPA template uses angular on the client side and ASP.NET Core as back-end. It uses a package Microsoft.AspNetCore.SpaServices as a middleware to provide different configurable options for your application such as HMR (Hot Module Replacement), Routing Helper, SSR (Server Side Rendering) etc.. In this post, let’s find out how to create an angular 6 app with ASP.NET Core 2.1 and implement ASP.NET Core SPA template features in the same app. Read More

How to create an Angular 6 app with Visual Studio 2017

At the time of writing this post, default ASP.NET Core SPA templates allow you to create Angular 5 based app with Visual Studio without installing any third-party extensions or templates. Angular 6 is out now and you can also upgrade the Angular 5 app to Angular 6. What if you want to create Angular 6 app with VS 2017? This post talks about how to create an Angular 6 App with Visual Studio 2017 and how to extend it with a simple example. Read More

New Way of Providing Shared Instance of a Service in Angular 6

Angular 6 is out and I recently posted a migration guide to upgrade Angular 5 app to Angular 6 with Visual Studio 2017. Though it’s a major release, but mainly focused on better tooling for improving the upgrading and adding new libraries a lot easier. There are some new features in Angular 6 and one of them is an alternate way of providing shared instance of a service in Angular 6. Read More

ASP.NET Core 2.1: Razor UI as Class Library

One of the new features of ASP.NET Core 2.1 is, Razor UI as a class library. It makes easier to build and include Razor based UI in a library and share it across multiple projects. A new Razor SDK will enable building Razor files into a class library project that can then be packaged into a NuGet package. You can package your Razor views and pages (.cshtml files) along with your controllers, page models, and data models. Apps can then include pre-built UI components by referencing these packages and customize the UI by overriding specific views and pages. In this post, we’ll see how to create Razor UI as class library and how to reuse it. Read More

.NET Core 3.0 announced: Welcome .NET Core for windows desktop applications

.NET Core 3.0 was announced yesterday at the Microsoft Build event and let’s welcome .NET Core supports for Windows Desktop applications. Finally, this is happening as developers were asking for desktop applications with .NET Core. The highlight of .NET Core 3 is support for Windows desktop applications, specifically Windows Forms, Windows Presentation Framework (WPF), and UWP XAML. You will be able to run new and existing Windows desktop applications on .NET Core and enjoy all the benefits that .NET Core has to offer. Read More

Upgrade Angular 5 app to Angular 6 with Visual Studio 2017

Angular 6 is out!! It’s another major release focused on minimum new features and more on the tooling to make upgrading and adding new libraries a lot easier. Earlier I posted about creating an Angular 5 application with Visual Studio 2017 using ASP.NET Core 2.1 SPA templates. Now, it’s time to upgrade the same angular app to the latest version which is Angular 6. This post talks about how to upgrade Angular 5 app to Angular 6 with Visual Studio 2017. The steps given in this post are applicable to any Angular 5 app, not limited Visual Studio 2017. Read More

Fix for Blazor error BL9986: Component attributes do not support complex content (mixed C# and markup)

Blazor 0.3.0 was released recently, and I thought of upgrading one of my previously created Blazor CRUD app to the recent version 0.3.0. The Blazor app uses a JavaScript function to control the visibility of the HTML controls present in the Todo list element. The HTML elements inside the list are given a dynamic ID to have uniqueness. Like,

<input id="txt_@todo.ID" style="display:none;">

Here, the ID attribute contains C# and HTML markup. Unfortunately, this gives an error BL9986: Component attributes do not support complex content (mixed C# and markup) while compiling in 0.3.0 version. This is a very common use case in any application to manipulate or apply markup based on the server-side data like applying different CSS classes based on a C# variable. In the first place, I was wondering why Blazor is not allowing this and unfortunately, there is not much help available online to fix it. Read More