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.



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
Get step-by-step solutions from verified subject matter experts
