For some reason, didInsertElement is not being called in my component if I access a URL directly rather than by navigating to it from the index route.
WORKS: localhost:4200/index >>#link-to>> localhost:4200/login
DOES NOT WORK: localhost:4200/login directly
I've truncated my actual template and component but this is the essential parts:
app/templates/login.hbs: (renders correctly in both cases)
{{#my-component}}
<div>Stuff</div>
{{/my-component}}
app/components/my-component.js:
export default Ember.Component.extend({
sayHey: function() {
alert('this called'); //not called when accessing login route directly
}.on('didInsertElement')
});
This is on Ember-CLI 0.2.0-beta.1
Aucun commentaire:
Enregistrer un commentaire