I am new to angular. I am trying to read the uploaded file path from HTML 'file' field whenever a 'change' happens on this field. If I use 'onChange' it works but when I use it angular way using 'ng-change' it doesn't work.
<script>
var DemoModule = angular.module("Demo",[]);
DemoModule .controller("form-cntlr",function($scope){
$scope.selectFile = function()
{
$("#file").click();
}
$scope.fileNameChaged = function()
{
alert("select file");
}
});
</script>
<div ng-controller="form-cntlr">
<form>
<button ng-click="selectFile()">Upload Your File</button>
<input type="file" style="display:none"
id="file" name='file' ng-Change="fileNameChaged()"/> </form>
</div>
fileNameChaged() is never called. Firebug also doesn't show any error.