LinkComponent#init()

initprivate

Inherited from Ember.ViewTargetActionSupport but overwritten in packages/ember-htmlbars/lib/components/link-to.js:497

An overridable method called when LinkComponent objects are instantiated.

Example:

App.MyLinkComponent = Ember.LinkComponent.extend({
  init: function() {
    this._super(...arguments);
    Ember.Logger.log('Event is ' + this.get('eventName'));
  }
});

NOTE: If you do override init for a framework class like Ember.View, be sure to call this._super(...arguments) in your init declaration! If you don't, Ember may not have an opportunity to do important setup work, and you'll see strange behavior in your application.

doc_EmberJs
2016-11-30 16:52:25
Comments
Leave a Comment

Please login to continue.