February 2016
Beginner to intermediate
308 pages
5h 46m
English
Creating and extending classes is a major feature of the Ember object model. In this recipe, we'll take a look at how creating and extending objects works.
Ember class using extend():const Light = Ember.Object.extend({
isOn: false
});This defines a new Light class with a property called isOn. Light inherits properties and behavior from the Ember object, such as initializers, mixins, and computed properties.
Ember Twiddle tip
At any point of time, you might need to test out small snippets of the Ember code. An easy way to do this is to use a website called Ember Twiddle. From this website, you can create an Ember application and run it in the browser as if ...
Read now
Unlock full access