hi rather simple angular form error still being quite tedious so this comes when i try to post a value to the data base by using angular forms
not much to explain ill just attach a ts file for understanding
Hi
@Asjad Butt
,
Please check your code, the
initializeForm
method/function is a void method/function, so it doesn't have the value property and the return data. So, in the AddTask method, just calling it as below:
AddTask(){
this.initializeForm();
If you want to return data in the method, in the method, you need to use the return statement, like this:
Then, calling the getItems method to get the data.
items = this.cartService.getItems();
Refer to this tutorial: Managing data.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion