I am currently in the process of developing a web application that includes edit functionality.
Currently, I have created a page with a list of records, each containing an ID.
When I click on the edit button, it triggers the following:
$state.go('editCustomer', { customerObj: customer });
This action then takes me to the edit page where the correct record is displayed and the data is pre-populated, which works fine.
However, I want to modify it so that clicking the edit button generates a URL like this: /customer?id=12345
Upon loading the edit page, it should extract the ID from the query string and make a call using $resource.
My question is how can I achieve this? Would I need to adjust the API routing on the server side to accommodate this change? Currently, the get request looks like this:
router.get('/:id', controller.show);
Any assistance would be greatly appreciated.
Thank you.