hi I am trying to display details of a particular id. the details are present in the global variable called 'list' of a service. the id I am getting through route parameters. the details I need to store in a variable named 'editexpense'.
here is my component :
ngOnInit(): void {
this.a_route.params.subscribe((params)=>this.expense_id=params.Expense_id);
this.editexpense = this.expense_ser.list
.find(expense => expense.Expense_id === this.expense_id)
}