Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49185

Loads of errors with chat application

$
0
0

@jesst446 wrote:

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) {
console.log(msg);
Chats.send($scope.displayName, msg);
$scope.IM.textMessage = "";
}

$scope.remove = function(chat) {
    Chats.remove(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

Posts: 5

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 49185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>