February 2016
Beginner to intermediate
308 pages
5h 46m
English
One advantage of a controller is storing properties. Controllers have properties that are stored in the application, which is unlike the model where properties are saved to the server. In this recipe, we'll take a look at a few different types of properties and how they can be displayed in a template.
$ ember g controller application
In this application, we'll be using the application controller to store all our properties.
// app/controllers/application.js import Ember from 'ember'; export default Ember.Controller.extend({ prop2: 'test', prop3: true, actions: { enter(val){ alert(this.get('prop1')); ...Read now
Unlock full access