Reputation: 216
I have an api built with Django Rest framework and a Front end that's built with Angular
For the reset password functionality, when the user clicks on the reset password they should provide email
within a reset password component on Angular. Then via submit
action It hits the POST
method of reset_password
with the email
in the body.
Then the reset password controller should send an email to the user with this format base_url/reset_password/<token>
When the user hits this url, they should be redirected to a reset password form with new password
and confirm password
The Question is: Where should this template be stored? Angular component or Django template?
What is the best practice for such case?
Upvotes: 1
Views: 496
Reputation: 910
I'd go with Angular component option due to the role of separation between UI and the data when you have a restful backend and a single page app.
Upvotes: 1