I have the 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>
Here, I want to display the 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 can I set EntityId and EntityType for div2 within the 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;
}
});