Loads of errors with chat application

I have a chat application was working fine yesterday and now its coming up with loads of errors. I am new to ionic so im not sure how i would go about fixing them. Here are the errors from the console.

the send button doesnt work the code on the controller.js is

$scope.sendMessage = function (msg) {
Chats.send($scope.displayName, msg);
$scope.IM.textMessage = “”;

$scope.remove = function(chat) {


code from the services js is

send: function (from, message) {
console.log(“sending message from :” + from.displayName + " & message is " + message);
if (from && message) {
var chatMessage = {
from: from.displayName,
message: message,
createdAt: Firebase.ServerValue.TIMESTAMP
chats.$add(chatMessage).then(function (data) {
console.log(“message added”);

Please help


it seem that your $scope.displayName is undefined
you need set $scope.displayName to a value or null

will that be in my controller or in one of the ionic files?


i need more information and code
from your controller

check where you set $scope.displayName

do you have an email that i can send the code too?

thank you for your help