Please i need help urgent , my button of next don t work

buttonhtml


post work fine but navigation no please i need help urgent the prev work fine also

I don’t like very much this kind of solution, I’d rather make that api call before and save ythe response somewhere else, then call the right path with router navigate on “click”.

Can you show me the code of your “prev” ?

2 Likes

Capture
i did it before i did the call api in methode save() and in next methode this.save() but i don t know what it is the condition how to say if post done then navigate to next page or navigate to same page , anyway the error that i get is that

ok the first problem is that you are trying to assign values from an undefined item (you don’t to any check and this is bad).

In this case I dont know if the response has a different structure or is undefined.

The prev works because it dosn’t make any api call.

what should i do ? can you tell me

in my opionin you should study a bit typescript / angular basic stuff and then try again.

I Dont know what you want to obtain with that code. As suggested, you should make api calls in a different place and only if you are sure you have the data, execute and do operations and stuff.

2 Likes

Learn the basics first. Cause what you are asking is something basic.

1 Like

resolved thank you by just writing another methode and call it in next methode