ryanto / ember-flash-message

Flash message for Ember.JS templates.
49 stars 23 forks source link

Message not rendering after transitionTo call. #11

Open minirobotdan opened 10 years ago

minirobotdan commented 10 years ago

Hi there Ryan, the problem I'm having is the flashmessage call renders when I don't use transitionTo, but when I do it does not render. As requested I've made a JSBin of the issue I've been having. Annoyingly, the JSBin works. Barring using Ember App Kit and the local storage adapter, it's essentially how my code is laid out.

http://jsbin.com/denitora/3/edit

I did manage to get some info that might pertain to the problem- Using the Ember Chrome Plugin and putting some console logs in your code, I found out that the currentMessage value survives the route transition, but doesn't seem to render.

screen shot 2014-05-22 at 15 42 07

This would indicate that the problem might be somewhere in the helper.

Any suggestions?

Emerson commented 10 years ago

I'm seeing this as well. Looking into it now.

Emerson commented 10 years ago

I can confirm that all tests are passing with Ember Canary Latest and Handlebars 1.3...

Emerson commented 10 years ago

@minirobotdan - Can you pull down the latest build and try it out? Would love to know if your problem has been resolved.

MatthewHager commented 10 years ago

This is happening on my application. Can confirm that the message shows up in the ember chrome plugin. I'm using an ember-cli based application. My code looks like this:

import Ember from 'ember';

export default Ember.Route.extend({
  actions: {
    passwordResetSuccess: function() {
      this.flashMessage('Password reset email sent.', 'message');
      this.transitionTo('sign-in');
    }
  }
});
    {{#flashMessage}}
    <div {{bind-attr class="message.type"}}>
      {{message.text}}
    </div>
    {{/flashMessage}}

I'm using ember 1.7.0

visoft commented 10 years ago

I'm having the same problem as @MatthewHager, using Ember 1.7.0.

Emerson commented 10 years ago

Hmmm, I'll try to have a look at this tonight. Thanks for the info.

visoft commented 10 years ago

@Emerson The code in your repo works as expected.