Rick Strahl's Weblog  

Wind, waves, code and everything in between...
.NET • C# • Markdown • WPF • All Things Web
Contact   •   Articles   •   Products   •   Support   •   Advertise
Sponsored by:
West Wind WebSurge - Rest Client and Http Load Testing for Windows

WebLog Posts in Category Angular


Categories
ASP.NET (324) .NET (175) Windows (76) JavaScript (72) jQuery (61) Visual Studio (54) IIS (48) Csharp (47) WPF (47) HTML (46) AJAX (45) ASP.NET (33) Localization (32) LINQ (30) WCF (28) MVC (26) Personal (25) Security (23) HTML5 (23) FoxPro (22) CSS (21) Angular (20) C# (19) Web Services (19) Web Api (16) COM (16) ADO.NET (15) Vista (11) XML (11) Sql Server (10) HTTP (10) IIS7 (10) Markdown (9) WebView (9) Microsoft AJAX (8) IIS7 (7) West Wind Ajax Toolkit (7) Web Connection (7) Entity Framework (6) Internet Explorer (5) Html Help Builder (5) Markdown Monster (5) Mobile (5) Live Writer (5) ASPNET5 (5) C++ (5) OWIN (5) Web (5) SignalR (5) Software Development (5) NuGet (5) WinForms (5) Westwind.Globalization (4) Source Control (4) Silverlight (4) Cordova (4) Conferences (3) DataBinding (3) ASP.NET Core (3) LetsEncrypt (3) Help Builder (3) ISV (3) Networking (3) Office (3) Opinion (3) Razor (3) Web Browser Control (3) WebLog (3) Web Development (2) Visual Studio Code (2) RegEx (2) RSS (2) Speaking (2) Tools (2) Linux (2) Installation (2) Bugs (2) Help (2) Authentication (2) .NET Standard (2) Addins (2) Deployment (2) Dotnet (2) ASP.NET vNext (2) ADO.NET (1) Chocolatey (1) Control Development (1) Credit Card Processing (1) Cross-Platform (1) Dynamic Types (1) Email (1) CSharp Dotnet (1) Desktop (1) AI (1) Security (1) Visual Studio (1) Blazor (1) Blogging (1) ASP.NET Markdown (1) Angular JavaScript (1) FireFox (1) Flexbox (1) Git (1) Graphics (1) Hardware (1) IOS (1) JSON (1) Musings (1) Migration (1) Travel (1) Typescript (1) Testing (1) Threading (1) rxJs (1) SEO (1) RazorPages (1) VS Code (1) Web Assembly (1) Web Deployment Projects (1) Web Design (1) WebSockets (1) WebSurge (1) WebBrowser (1) WebDeploy (1) WFH (1) WPF Windows (1) WSL (1) wwHoverPanel (1) Windows-Terminal (1) Windsurfing (1)

Creating Angular Synchronous and Asynchronous Validators for Template Validation



Validations are a key feature of any business application and in Angular there's an infrastructure for building validators built in. A number of existing validators provide the basics but if you have custom business logic to process for validation you'll need to create custom Validators. In this post I describe how to create both sync and asycn Angular Validators for use in declarative forms.

Using the ng-BootStrap TypeAhead Control with Dynamic Data



I recently swapped my Auto complete logic in an application to use ng-bootstrap's nice and relatively easy to use TypeAhead control and I ran into a small snag trying to figure out how to bind dynamic data retrieved from the server. The examples show local data binding but fail to show how to load and update the control with remote data. In this post I show how the control works both in sync and async mode and point out the simple solution that eluded my via the Observable switchMap operator.

Creating a custom HttpInterceptor to handle 'withCredentials' in Angular 6+



Client HTTP requests often need to set a few common settings and you don't want to set them on every request. To make this process easier Angular provides an HttpInterceptor class that you can subclass and add custom behavior to for each HTTP request that is sent through the HttpClient. Here's a quick review on how to do this.

Updating my AlbumViewer to ASP.NET Core 2.1 and Angular 6.0



Took some time to upgrade my AlbumViewer application to ASP.NET Core 2.1 RC and Angular 6.0. The .NET Core update was very smooth with only very minor adjustments required showing that Microsoft has smoothed out the update path significantly from the frenetic pace of past versions. The Angular update was a bit more involved primarily due to the changes in rxJS.

Dev Intersection 2017 Session Slides and Samples Posted



I've posted my Session Slides and code samples from last week's DevIntersection conference on GitHub.

Handling HTML5 Client Route Fallbacks in ASP.NET Core



HTML5 client routes work great on the client, but when deep linking into a site or pressing refresh in the browser, HTML5 client side routes have a nasty habit of turning into server HTTP requests. Requests to routes that the server is likely not configured for. In this post I look at why HTML5 client routes require server cooperation to handle and how to set them up on IIS and/or ASP.NET Core.

Updating my AlbumViewer Sample to ASP.NET Core 1.1 and Angular 4



I updated my AlbumViewer sample application recently to the latest versions of ASP.NET Core (1.1) and the new .csproj project as well Angular 4

New CODE Magazine Article: Getting down to Business with ASP.NET Core



The latest issue of CODE magazine features my `Getting down to Business with ASP.NET` Core article as the cover article. The article focuses on building an ASP.NET Core backend for an Angular 2 front application, covering all aspects of separating business and Web app logic, dealing with EF Core data access in related tables, CORS to be able to run across domains and simple authentication in a client centric REST service application. Check it out.

Error Handling and ExceptionFilter Dependency Injection for ASP.NET Core APIs



Exception handling in API applications is important as errors - both handled and unhandled - need to be passed to clients in some way to let them display error information. ASP.NET's default error handling doesn't provide for object error results by default, but you can use an ExceptionFilter to intercept exceptions and format them yourself. In this post I look at how to create an API exception filter to create error object responses, and hook up custom logging of those errors to disk.

Bootstrap Modal Dialog showing under Modal Background



On more than a few occasions I've run into issues with Bootstrap's Modal dialog rendering incorrectly with the dialog showing underneath the overlay. There are a number of ways around this problem, but none of them are universal that depend on how your pages are laid out. It's especially problematic for applications that dynamically render components where there's no good control on where the elements are placed outside of the components DOM containership. In this post, I describe a few of the workarounds and their limitations.

External JavaScript dependencies in Typescript and Angular 2



Angular 2.0 and Typescript make it very easy to import external Typescript classes and references using the module loading functionality built into Typescript (and ES6). However, if you need to work with external libraries that aren't built with Typescript you need to do a little extra work in importing and referencing the external libraries. In this post I show two approaches for importing libraries as modules and dereferencing library globals so that the Typescript compiler is happy.

The Rise of JavaScript Frameworks – Part 2: Tomorrow



JavaScript frameworks are undergoing a huge change for their V2 releases, going through the growing pains of providing a more modern platform and bridging new technologies. While the new frameworks promise improved performance and usability, there is also quite a bit of pain involved in respect to the build process and making the move to ES6.

The Rise of JavaScript Frameworks - Part 1: Today



JavaScript frameworks have moved front and center in the mainstream in the last year and a half or so. When building modern Web applications, the bar has been raised significantly by what is possible in large part due to the more accessible mainstream frameworks that are available today to build rich client and mobile Web applications. In this post I'll explore why JavaScript frameworks have become so popular so quickly and how it effects the future of Web development. This two part series addresses the current state in this post, and the new crop of V2 frameworks arriving later this year in the Part 2.

Right To Left (RTL) Text Display in Angular and ASP.NET



Recently I was gently asked to add support for RTL language editing in my Westwind.Globalization library and the Web Resource Editor. The Editor supports displaying resources in all of its localized version, but it didn't respect the RTL setting for languages that required it. In this post I describe how RTL support works in browsers, how you can detect RTL support on a locale in .NET and demonstrate how I integrated basic RTL edit and display support for the Resource Editor using a custom Angular directive.

Angular Select List Value not binding with Static Values



Ran into a problem converting from Angular 1.3 to 1.4rc a couple of days ago. The issue is that the way ng-model bindings work has changed, in that Angular 1.4 and later uses exact type matching for value comparisons which results in behavior changes. In my case I ran into a problem with static list values binding to a non-string value which caused the binding to effectively not work at all. Here's what the problem is and how to work around it.

Mixing $http Promises and $q Promises for cached Data



When creating services it's often useful to return data from the $http service, or cached data that already exists. You can't however just return the cached data, but have to turn it into a promise so it matches the $http callback signature. Here's how to deal with this frequent scenario.

AngularJs and Promises with the $http Service



The AngularJs $http object returns custom promises which can be surprising when you try to work with them. You can use either .then() or the easier .success() and .error() methods - at the cost of some inconsistency in Promise usage as these extension are specific to the $http functions. In this post I review a few different ways you can use promises and more importantly what the various $http methods return.

AngularJs ng-cloak Problems on large Pages



Angular supports the ng-cloak directive to address hiding initially unrendered template content. I found out the hard way that sometimes with very large pages this mechanism doesn't quite work and still results in slight page flicker of the unrendered template content. In this post I describe the problem and several easy solutions to get around it the edge case scenario.

Routing to a Controller with no View in Angular



Angular provides a nice routing, and controller to view model that makes it easy to create sophisticated JavaScript views fairly easily. But Angular's views are destroyed and re-rendered each time they are activated - what if you need to work with a persisted view that's too expensive to re-render? Here's how to build a headless controller that doesn't render a view through Angular, but rather manages the the view or markup manually.

JavaScript Arrays, References and Databinding in Angular



Ran into a snag with Angular Databinding where items added to an array $scope variable were not 'overwriting' other array elements. Turns out this isn't an Angular issue, but a JavaScript referencing issue, that can be easy to miss when using data binging.
West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2024