Files
side-by-side/source/scripts/services/poems.js.coffee
T
2014-12-21 21:14:13 +01:00

27 lines
493 B
CoffeeScript

angular.module("sideBySide").service "poems", () ->
@all = [{
meta: {
Active: true
Loading: "Loading"
}
content: [{
section: 'Loading...'
text: 'Please be patient!'
}]
}]
@heading = undefined
# Get active poems
#
# @return [Array] Active poems
@getActive = () ->
(poem for poem in @all when poem.meta.Active is true)
# Get inactive poems
#
# @return [Array] Inactive poems
@getInactive = () ->
(poem for poem in @all when poem.meta.Active is not true)
@