{"size": 379, "ext": "js", "max_stars_repo_path": "app/js/controllers/messenger.js", "max_stars_repo_name": "PabloSuarez/angular-messenger", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/js/controllers/messenger.js", "max_issues_repo_name": "PabloSuarez/angular-messenger", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/js/controllers/messenger.js", "max_forks_repo_name": "PabloSuarez/angular-messenger", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 14.5769230769, "max_line_length": 46, "alphanum_fraction": 0.562005277}
function MessengerCtrl(ChatService) {
  'ngInject';

  // ViewModel
  this.init = () => {
    this.totalOnline = 13;
    this.newMessage = '';
  };

  this.init();


  // ACTIONS
  this.send = () => {
    ChatService
      .save(this.newMessage || 'rrr rrr rrrr')
      .then(() => this.newMessage = '');
  };

}

export default {
  name: 'MessengerCtrl',
  fn: MessengerCtrl
};
