diff --git a/src/controllers/chat.controller.js b/src/controllers/chat.controller.js new file mode 100644 index 0000000..a37f0cd --- /dev/null +++ b/src/controllers/chat.controller.js @@ -0,0 +1,20 @@ +import { Chats } from 'api/collections'; +import { Controller } from 'angular-ecmascript/module-helpers'; + +export default class ChatCtrl extends Controller { + static $inject = ['$stateParams'] + + constructor() { + super(...arguments); + + this.chatId = this.$stateParams.chatId; + + this.helpers({ + data() { + return Chats.findOne(this.chatId); + } + }); + } +} + +ChatCtrl.$name = 'ChatCtrl'; \ No newline at end of file