Category: Angular
-
Clipboard API and Angular
In this article, I will show you how to display an image copied directly into your application using Ctrl+V. Configuration in the Template In your template, you will create a div that listens to the (paste) event. This event will be triggered when the user performs a CTRL+V, and it defines an area in your…
-
Avoiding Input Issues with MatDatepicker in Angular
When using the Angular Material Datepicker (MatDatepicker), developers often face formatting challenges, especially when dates are manually input by the user. The material-moment-adapter provides an elegant solution to handle these issues. 1. Date Format Issue During Manual Input When using the MatDatepicker, if a user manually enters a date in the format dd/mm/yyyy (french format…
-
How to download a file in Angular .NET
In this article, I will show you how to download a file in an Angular project with a .NET 5+ Web Api. .NET Side You need to create a controller, for example DownloadController, with a DownloadFile Api of HttpGet type. If you want you can send the file name to be downloaded as a parameter…
-
How to send File from Angular To Web Api C# .Net
Passing a file from Angular to a C# Web API with .NET 5.0 can be useful when you need to upload a file to your server for processing or storage. Here’s how: 1: You need to configure your C# Web API to accept uploaded files. To do this, you need to add a controller action…