Editing and Deleting Products in Firebase
Explore how to edit and delete products within an Ember.js application by integrating Firebase. Learn to find, update, and delete product records using Ember Data's findRecord, save, and deleteRecord methods, then manage route transitions to maintain smooth user interactions.
We'll cover the following...
We'll cover the following...
The admin/edit route is responsible for editing and deleting the products. We’ve already defined the editProduct() and deleteProduct actions in the edit controller.
Let’s open app/controllers/admin/edit.js and add the required code:
Editing the product
-
Line 7: We receive the clicked product
idfrom our model. We ...