Ember.A()

AEmber.NativeArraypublic

Defined in packages/ember-runtime/lib/system/native_array.js:108

Creates an Ember.NativeArray from an Array like object. Does not modify the original object. Ember.A is not needed if EmberENV.EXTEND_PROTOTYPES is true (the default value). However, it is recommended that you use Ember.A when creating addons for ember or when you can not guarantee that EmberENV.EXTEND_PROTOTYPES will be true.

Example

export default Ember.Component.extend({
  tagName: 'ul',
  classNames: ['pagination'],

  init() {
    this._super(...arguments);

    if (!this.get('content')) {
      this.set('content', Ember.A());
    }
  }
});
doc_EmberJs
2016-11-30 16:51:05
Comments
Leave a Comment

Please login to continue.