In my angular application, I am getting an error when invoking an API method from angular. I have to pass two parameters. First one an integer value and second one string value. it is optional.
Please see the below code snippet (Typescript)
let id:number = 5;
let value: string = "";
this.http.get<string[]>(this.appService.baseUrl + 'api/File/' + id + "/" + value)
In Controller:
[HttpGet("{id:int}/value")]
[ResponseCache(NoStore = true)]
public async Task<IActionResult> Get(int id, string value) { }
Here the Get method is not invoking since the value parameter is empty.