Frontend Controller Design & Development
The backend controller is mostly form data collection and sending to backend API. Although this is simplified assumption but is largely applicable to most of the business softwares like ERP, CRM, sales, HR, warehouse, e-commerce, etc.
The controllers can be defined as below:
- Path: The path is same as form. Although the method shall be defined in the “.ts” file with method called in the ‘form” submit action in the “.html” file. Therefore the ordering should have the form prompt before the controller prompt.
- Method naming should be same as before, I.e. @Asset-@Action
- Initial code & prompt should be based on the general pattern of the angular which is mostly about infilling the API caller using a centralized GET and POST service utilizing the AXIOS library for ease of use. The prompt shall ask the AI to make the improve the call method with appropriate data preparation before initiating the call and handling the return response to show use that form has been successfully submitted.
—————Initial Code—————————
————————————————————
————Prompt————————————
————————————————————
Next: Styling
Updated: Oct 11, 2024