Files
side-by-side/source/scripts/services/poems.js.coffee
T

27 lines
489 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 == true)
# Get inactive poems
#
# @return [Array] Inactive poems
@getInactive = () ->
(poem for poem in @all when poem.meta.Active != true)
@