It’s just like this in a Controller:
$scope.$on('$ionicView.enter', function () {
ChatService.loadChat(chatId).then((messages) => {...})
})
It’s just like this in a Controller:
$scope.$on('$ionicView.enter', function () {
ChatService.loadChat(chatId).then((messages) => {...})
})