I am editing the file, here i can change the filename as well as i can add another file for versions, If I have chosen the file, filename edit field should be disabled immediately. I have tried this following code, but its not get disabled until i type something in filename field.
My View code:
<div class="ipfield">
<label class="plclabel">Choose file</label>
<input type="file" class="txt_box" id="newfile"
onchange="angular.element(this).scope().fileNameChanged()">
</div
<div class="ipfield" >
<label class="plclabel">File Name</label>
<input type="text" class="txt_box" ng-disabled="filechoosen" ng-
model="filenameedit" id="filenameedit">
</div>
My app.js
In my controller I have wrote function:
$scope.filechoosen = false
$scope.fileNameChanged = function() {
$scope.filechoosen= true
}
Is there any mistake in my code.