update to 1.3.x of angular
chat controller replace $scope w this.
chat controller
Karma test config