Ember JS – transitionTo route and then display Feedback message

Since i am a bit newbie and just starting doing some frontend, i am having an issue with EmberJS transitionTo().
The problem is that when i click "delete" inside details of the product, it displays the feedback message there, and then it transits to the home page.
I want to transit first to home page if i am at details, and then display the feedback message.

the code i have:

delete: function(system,) {
  const self = this;
    .then(function() {
      self.setFeedbackSuccess(self.currentModel, self.get('intl').t('delete.success'));
    }).then(() => self.refresh())
    .then(() => {
      self.setFeedbackSuccess(self.currentModel, self.get('intl').t('delete.success'));
    .catch((errorObject) => {..})
    .catch((errorObject) => self.errorHandler(errorObject, self.currentModel));

The first call to the function is where the feedback is displayed at the detail page, if i remove it from there, after .then(() => self.refresh()) it will show nothing from feedback, unless i am at the home page, and delete from there.

3 thoughts on “Ember JS – transitionTo route and then display Feedback message”

  1. 965300 559201Someone necessarily assist to make critically articles Id state. This really is the first time I frequented your web page and thus far? I amazed with the analysis you made to make this actual submit incredible. Exceptional activity! 654476


Leave a Comment