<commit_before>// Angular controller for room.html
angular.module('roomCtrl', [])

.controller('roomController', ["$firebaseArray", function ($firebaseArray) {

  var vm = this;

  var generalRef = new Firebase("https://bizgramer.firebaseio.com/hr/rooms/general")
  vm.allGeneralMsg = $firebaseArray(generalRef);

  this.addMessage = function (e) {
    if (e.keyCode === 13) {
      var userName = vm.username || 'anon';
      var roomName = vm.roomname || 'general';
      console.log(userName, roomName, vm.text);

    var url = "https://bizgramer.firebaseio.com/hr/rooms/" + roomName;
    console.log(url);
    var ref = new Firebase(url);

    vm.allMessages = $firebaseArray(ref);

      vm.allMessages.$add({
        username: userName,
        text: vm.text
      });

      vm.text = '';
    }
  }
}]);

<commit_msg>(feat) show room list, link to general room closed #63<commit_after>// Angular controller for room.html
angular.module('roomCtrl', [])

.controller('roomController', ["$firebaseArray", function ($firebaseArray) {

  var vm = this;

  var generalRef = new Firebase("https://bizgramer.firebaseio.com/hr/rooms/general");
  vm.allGeneralMsg = $firebaseArray(generalRef);

  this.addMessage = function (e) {
    if (e.keyCode === 13) {
      var userName = vm.username || 'anon';
      var roomName = vm.roomname || 'general';
      console.log(userName, roomName, vm.text);

    var url = "https://bizgramer.firebaseio.com/hr/rooms/" + roomName;
    console.log(url);
    var ref = new Firebase(url);

    vm.allMessages = $firebaseArray(ref);

      vm.allMessages.$add({
        username: userName,
        text: vm.text
      });

      vm.text = '';
    }
  };
}]);


{'fraction_non_alphanumeric': 0.1596688350088705, 'fraction_numerical': 0.0035481963335304554, 'mean_word_length': 3.0673076923076925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4084475', 'n_tokens_mistral': 572, 'n_tokens_neox': 545, 'n_words': 115}