I want to show update variable in my template.While selecting a file,it's change event catching function inside I'm changing my scope variable.But it's not showing in my template.
Here is my html code
<div ng-app="app" ng-controller="ActivationLocusRegistrationCtrl as vm" >
<div class="row">
<div class="columns small-7 medium-5 large-5">
<label for="taxDoc" ">
Tax Certification Form<small style="color:red;"> *</small> {{taxDocErrorMessage}}
</label>
</div>
<div class="columns small-5 medium-7 large-7">
<input type="file" name="taxDoc" id="taxDoc"
file-model="myFile"
onchange="angular.element(this).scope().fileUploadTaxDoc(this)"
required />
<span class="form-error" data-ng-show="taxDocErrorMessagel">{{errorMessages[0]}}</span>
</div>
</div>
</div>
here is my js code
(function () {
'use strict';
angular
.module('app')
.controller('ActivationLocusRegistrationCtrl', ['$scope' , ActivationLocusRegistrationCtrl]);
function ActivationLocusRegistrationCtrl($scope) {
$scope.taxDocErrorMessage = false;
$scope.fileUploadTaxDoc = function (a) {
$scope.taxDocErrorMessage = true;
};
}
}());
I checked this while debugging, it's show true. please tell me what is the mistake in this code. thanks