Skip to content

Commit

Permalink
Step 4.2: Add chat controller
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB authored and Dotan Simha committed Nov 22, 2016
1 parent 1d1e3cc commit 77a42c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 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';

0 comments on commit 77a42c4

Please sign in to comment.