summaryrefslogtreecommitdiffstats
path: root/js/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-05-19 16:21:17 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-05-19 16:21:17 +0200
commitb5d5b2b22a2b4aabd4c9bb5c8b89aae10facc735 (patch)
tree39d71ee89d973f6151ed013edc8d5ca3deff160f /js/controller
parent274034a63374434298204db21e6d6513690e6eaf (diff)
bind items to controller
Diffstat (limited to 'js/controller')
-rw-r--r--js/controller/ContentController.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/js/controller/ContentController.js b/js/controller/ContentController.js
index ffada2a5c..51309a93d 100644
--- a/js/controller/ContentController.js
+++ b/js/controller/ContentController.js
@@ -7,8 +7,17 @@
* @author Bernhard Posselt <dev@bernhard-posselt.com>
* @copyright Bernhard Posselt 2014
*/
-app.controller('ItemController', function () {
+app.controller('ContentController', function (Publisher, Feed, Item, data) {
'use strict';
- console.log('here');
+ // distribute data to models based on key
+ Publisher.publishAll(data);
+
+ this.getItems = function () {
+ return Item.getAll();
+ };
+
+ this.getFeeds = function () {
+ return Feed.getAll();
+ };
}); \ No newline at end of file