New to Angular, so we apologize if the question is stupid.
So, I’m making an application, and one part of it is outside the Angular “so to speak” area, and this part is responsible for receiving incoming messages (xmpp)
And then there is the Angular controller, which should receive notifications about incoming messages. What I did is an ugly job, but it works:
view.html:
<button ng-click="refreshLayout()" id="refreshLayoutButton" style="display:none"></button>
controllers.js:
.controller('chatCtrl', function($scope) {
$scope.refreshLayout = function() { ... }
})
outside.js:
if(incomingMessage) {
$("#refreshLayoutButton").click();
}
Is there anyway to exclude jQuery? I want to send a message from external.js to chatCtrl and then send it to view.html
OR
just report this event so that it can call $ scope.refreshLayout (techincally I can add incoming messages directly to view.html using jQuery without Angular, but the first option is even more preferable)