I have Following div
<div ng-controller="MyController as MC" id="div1">
<a href="#" id="1" ng-init="MC.EntityId = 1 , MC.EntityType = 57" ng-click="MC.LoadFiles(MC.EntityId, MC.EntityType)" title="Upload">Upload </a>
</div>
I want to display here EntityId and EntityType that i have set in div1
<div ng-controller="MyController as MC" id="div2">
EntityId = {{MC.EntityId}}, EntityType = {{MC.EntityType}}
</div>
How do i set EntityId and EntityType for div2 in LoadFiles function without using angular.element.
app.controller('MyController', function () {
this.EntityId = 0;
this.EntityType = 0;
this.LoadFiles = function (id, type){
this.EntityId = id;
this.EntityType = type;
}
});