I have a Webprojekt with FireBaseCloudMessaging running. Now i have to call a Method in a Typescript File to reload the Messages on Notification. Is this Possible?
HTML Part (index.html)
<script src="https://www.gstatic.com/firebasejs/4.3.0/firebase.js"></script>
<script>
messaging.onMessage(function(payload) {
console.log("Message received. ", payload);
// ChatDialog.reloadMessages(); <-- Here i have to call the Typescript Method
});
</script>
ChatDialog.ts
//This is the Method i have to call!
reloadMessages(){
this.messages.removeAll();
localStorage.clear();
ChatFunctions.getMessages(this, this.partner_id);
}