Controllers.cs works on diffrent address – .net core angular app from visual studio template

I created a new project in .Net Core and Agnular from visual studio template and I cant get data from controller. It works with controller genereted from template WeatherController.cs but not with my own. I mean it works when I call controller like that: https://localhost:5001/home/getData/1 but application starts at 5002 and method from weatherController also […]

By Xia
Published
Categorized as angular, asp.net-core, get, http Tagged , , ,

Preview the picture below the picture on mouse over but only in small circle like a magnifying glass [duplicate]

I have pictures of the device on technical drawing and I want to see this drawing below only in small circle. I dont know how to settle ten effect. Something like this: https://www.w3schools.com/howto/howto_js_image_magnifier_glass.asp but I do not want to enlarge but to show the part of the picture which is under this picture. Im using […]

By Xia
Published
Categorized as angular, animation, css, html, image Tagged , , , ,

Angular snackbar property not disappear

I tried to use angular material but no property works. openSnackBar(message: string) { this._snackBar.open(message), { duration: 300, horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, } What have I been trying openSnackBar(message: string) { this.ngZone.run(() => { this._snackBar.open(message), { duration: 300, horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, } }) } snackbar shows up but doesn’t disappear. It also ignores position settings. […]

By Xia
Published
Categorized as angular, angular-material, snackbar Tagged , ,

Angular snackbar not disappear

I tried to use angular material but no property works. openSnackBar(message: string) { this._snackBar.open(message), { duration: 300, horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, } What have I been trying openSnackBar(message: string) { this.ngZone.run(() => { this._snackBar.open(message), { duration: 300, horizontalPosition: this.horizontalPosition, verticalPosition: this.verticalPosition, } }) } snackbar shows up but doesn’t disappear. It also ignores position settings. […]

By Xia
Published
Categorized as angular, angular-material, snackbar Tagged , ,

Amcharts- how to align multiple series of circle bubbles horizontally

I want to draw a heatmap with bubbles for different fields like the following picture which alignes horizontally for each year. However, I still got stuck after reading a lot of docs at amcharts. I created 5 series in total for each field, using the following codes: let chart = am4core.create(title, am4charts.XYChart); chart.maskBullets = false; […]

By Xia
Published
Categorized as amcharts, angular, javascript Tagged , ,

How to return error message from service to controller and then to client

How can I return error message from service.cs to controller and then to client side (Angular) when element is null for example? What is the correct way to return information what goes wrong on server side? I just want ot return ex.Message or string with information when for example element is null. Angular getTree(id: number) […]

By Xia
Published
Categorized as .net-core, angular, c#, error-handling, typescript Tagged , , , ,

Angular 11 and .Net post method not working

I am trying to post data from Angular side to .Net and I’m not hits the breakpoint at Controller c#. Do I need some configuration? I have already sent data in this way in Angular 8 before and it was working. c# public class UpdateViewModel { public int Id { get; set; } public string […]

By Xia
Published
Categorized as angular, asp.net-core, c#, http-post, typescript Tagged , , , ,

Get request with dates as parameter Angular 8 (ts) + .Net Core

I tried sending 2 dates as a parameter in the get request but I am getting only this: C# Angular Model public class Dates { public DateTime from { get; set; } public DateTime to { get; set; } } .net core [HttpGet] [Route("main/exportToExcel")] public string ExportToExcel([FromQuery] Dates dates) {} Angular let params = new […]

By Xia
Published
Categorized as .net, angular, core, httprequest Tagged , , ,

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq