#6 Filter Arrays

Let’s say you have a collection of Articles and you want to filter them.  One of the easiest way to do this using the built-in computed helpers.

The above collections will automatically re-compute as the “articles” array changes, so if you change an article status in articles from active to draft, it will reflect accordingly in each computed array, here is an example https://ember-twiddle.com/fa50909f2683d7335fc8b3fb0d9009ab?openFiles=controllers.application.js%2C

Explore more at http://emberjs.com/api/classes/Ember.computed.html

Also published on Medium.

Published by

Emad Ibrahim

Author of asp .net MVC & TDD, entrepreneur, passionate technologist, programmer and productivity nut. more at http://t.co/oSJXPvzu