Sponsored

Showing posts with label Angular. Show all posts
Showing posts with label Angular. Show all posts

Wednesday, February 3, 2021

.NET Web API: Confusing 404 Response to OPTIONS Request for CORS pre-flight

Problem: when a Angular applications sends an OPTIONS request to its own backend to satisfy CORS preflight policy it unexpectedly receives a 404 response from a .NET Core Web API application that effectively blocks an actual data data request from executing correctly. If you have ever experienced this problem, continue reading to understand what the problem is and how to fix it. 

Friday, December 18, 2020

Angular: Mock NgRedux for Unit Testing

If you use Redux in your Angular web application (likely it is an NgRedux from Angular Redux) and develop unit tests for components that depend on the Redux store sometimes it's easier to mock the Redux store rather than deal with incorrect values that it may supply in a test scenario. If this sounds like your situation, read on.