Category AngularJS

Angular 2 Lazy Loading with Webpack 2

This article shows how Angular 2 lazy loading can be supported using Webpack 2 for both JIT and AOT builds. The Webpack loader angular-router-loader from Brandon Roberts is used to implement this. A big thanks to Roberto Simonetti for his help in this. Code: Visual Studio 2015 project | Visual Studio 2017 project Blogs in […]

Building production ready Angular apps with Visual Studio and ASP.NET Core

This article shows how Angular SPA apps can be built using Visual Studio and ASP.NET Core which can be used in production. Lots of articles, blogs templates exist for ASP.NET Core and Angular but very few support Angular production builds. Although Angular 2 is not so old, many different seeds and build templates already exist, […]

Angular2 search with ASP.NET Core and Elasticsearch

This article shows how a website search could be implemented using Angular 2, ASP.NET Core and Elasticsearch. Most users expect autocomplete and a flexible search like some of known search websites. When the user enters a char in the search input field, an autocomplete using a shingle token filter with a terms aggregation used to […]

Angular2 autocomplete with ASP.NET Core and Elasticsearch

This article shows how autocomplete could be implemented in Angular 2 using ASP.NET Core MVC as a data service. The API uses Elasticsearch to query the data requests. ng2-completer is used to implement the Angular 2 autocomplete functionality. Code: https://github.com/damienbod/Angular2AutoCompleteAspNetCoreElasticsearch 2017.01.07: Updated to csproj, webpack 2.2.0-rc.3, angular 2.4.1 To use autocomplete in the Angular 2 […]

Using SASS with Webpack, Angular2 and Visual Studio

This post shows how to use SASS with Webpack and Angular 2 in Visual Studio. I had various problems trying to get this to work from Visual Studio using a Webpack build. The following is a solution which works, but not the only one. Code: https://github.com/damienbod/Angular2WebpackVisualStudio 2017.01.07: Updated webpack 2.2.0-rc.3, angular 2.4.1 Install node-sass globally, […]

IdentityServer4, Web API and Angular2 in a single ASP.NET Core project

This article shows how IdentityServer4 with Identity, a data Web API, and an Angular 2 SPA could be setup inside a single ASP.NET Core project. The application uses the OpenID Connect Implicit Flow with reference tokens to access the API. The Angular 2 application uses webpack to build. Code: https://github.com/damienbod/AspNet5IdentityServerAngularImplicitFlow 2017.01.07: Updated to IdentityServer4 1.0.0, […]

Full Server logout with IdentityServer4 and OpenID Connect Implicit Flow

The article shows how to fully logout from IdentityServer4 using an OpenID Connect Implicit Flow. Per design when using an access token to use protected data from a resource server, even if the client has logged out from the server, the access token can be used so long it is valid (AccessTokenLifetime) as it is […]