Question: Ember js/ firebase- I have a post.hbs file that which then links to {{ add-new-post }} allowing the user to create a new post. that

Ember js/ firebase- I have a post.hbs file that which then links to {{add-new-post}} allowing the user to create a new post. that works fine but I want to be able to delete the post. I created a new component delete post and as shown in the pictures but it won't respond. I'm not sure what my error is. Any clarification would be very helpful.Ember js/ firebase- I have a post.hbs file that which then links

to {{add-new-post}} allowing the user to create a new post. that works

fine but I want to be able to delete the post. I

created a new component delete post and as shown in the pictures

delete-post.js 1 2 import Component from'Gember/component' import {inject as service} from @ember/service. ; import $ from 'jquery'; export default Component.extend ( 4 DS: service( 'store'), 7 actions: delete function(post) this.get( 'DS).find ( 'post', post).then(function(post) post.destroyRecord); 10 12 13 14 15 16 17 ) 18 delete-post.js 1 2 import Component from'Gember/component' import {inject as service} from @ember/service. ; import $ from 'jquery'; export default Component.extend ( 4 DS: service( 'store'), 7 actions: delete function(post) this.get( 'DS).find ( 'post', post).then(function(post) post.destroyRecord); 10 12 13 14 15 16 17 ) 18

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!