ember-cli-101-errata
ember-cli-101-errata copied to clipboard
Page 113: snippet lacks indication that previous content should be retained
This snippet on page 113 of app/controllers/articles/index.js lacks indication that the previous content of the class should not be removed:
import Ember from 'ember';
export default Ember.Controller.extend({
contentDidChange: function() {
console.log('Called when we add or removed an article.');
}.observes('model.[]'),
stateDidChange: function() {
console.log('Called when the state property change for any of the articles.'\
);
}.observes('[email protected]')
});
The previous content includes the following properties:
queryParams: ['show'],
possibleStates: ['borrowed', 'returned'],
...which must be retained for the code to work. That is, these two lines should be added to the snippet on page 113.