I created a component, it gives the output as :
import Ember from 'ember';
import layout from '../templates/components/sample-work';
export default Ember.Component.extend({
layout
});
When i try to add some init method like :
import Ember from 'ember';
import layout from '../templates/components/sample-work';
export default Ember.Component.extend({
layout,
init(){
alert.log('hi');
}
});
My component not at all called. what is the issue here? what is the correct way to handle the component here?
Aucun commentaire:
Enregistrer un commentaire