DIR Return Create A Forum - Home
---------------------------------------------------------
Wealth Elite
HTML https://wealthelite.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 151--------------------------------------------------
This is the new method
By: asim km Date: September 4, 2023, 12:25 am
---------------------------------------------------------
Here, tells to look for a property named in the object contained
in the request body. So when we send a request to , will use the
property of the video object in the request body to set the
parameter in the route. The third parameter of the method is
used to extend the service. UPDATE: How: For some reason known
only to the developers, you cannot send requests using the
service by default. You need to extend it by adding an update
method that uses . Next, we use to get the video with a given .
This is to populate the form when the page loads.
The first parameter of provides the value of the parameter in
the route. We use , which gives us access to parameters in the
browser's address bar. Remember the route declaration for the
edit page? There, we used route parameters . Therefore, we can
access it via . In the callback method of the video. , we fetch
the video returned from the server and store it in . This way,
the Phone Number List
HTML https://agbdirectory.com/
form will be automatically populated
with our video object while the two-way binding of is running in
the background. do you remember? We bind the input field to a
property of the video object on . Any changes in the input
fields will be reflected in and vice versa.
[img]
HTML https://scontent.fdac5-2.fna.fbcdn.net/v/t39.30808-6/375057161_263421249912062_5916241705508741292_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=49d041&_nc_ohc=X8atlqaGutgAX82Qsso&_nc_ht=scontent.fdac5-2.fna&oh=00_AfC7LvvObNo1o0z7LPAzwR1_80uIRLyAnIbWEAoyTshxKw&oe=64F889F9[/img]
HTML https://agbdirectory.com/
Finally, in the body of the controller, we define a save method
that will be called when the user clicks the save button. Note
that here we use , not . we defined earlier when extending the
service. So this will make a request to our endpoint. We're
almost done. Our new controller is ready. We just need to
reference it in the routing configuration. Change the routing
configuration as follows: Let's test this new functionality.
Return to the browser and refresh the homepage. Choose one of
the videos. Make some changes and click the Save button.
Everything should work. In the next section, we'll add a feature
to the Video Rental Store application to build out the full
functionality.
*****************************************************