0 votes
in JavaScript by

What are enumerable in ember.js?

2 Answers

0 votes
by

A component is something which encapsulates certain snippets of handlebars templates that are to be used again and again. In such case, a JavaScript is not necessary to be written. Just define the entire handlebars template and use the component that is created. Components make it easy to reuse the code, create widgets, tags in or not in the W3C, and much more. Components in ember.js are basically versions of web components.

Defining a component in Ember.js: Ember generate component component_name;

0 votes
by

An enumerable is any object in ember.js which contains a number of child objects and allows us to work with those children using “ember.enumerable” API. The native JavaScript array is the most common enumerable in a majority of applications, which ember.js extends to conform to the enumerable interface. Ember.js provides us with a standardized interface for dealing with the enumerable and allows us to completely change the way our underlying data is stored without modifying the other parts of the application which accesses it. This API follows ECMAScript specifications as much as possible which hence minimizes the incompatibility with other libraries. It also allows ember.js to use the native browser implementations in arrays where they are available.

Related questions

0 votes
0 votes
asked Mar 13, 2020 in JavaScript by Tate
0 votes
asked Mar 12, 2020 in JavaScript by GeorgeBell
...