I have a file upload button, after uploading I want the selected file names to appear in the row below, using Angular ngRepeat, But the list does not appear.
Here my Code:
var pniotApp = angular.module('pniotApp', []); pniotApp.controller('pniotCtrl', function ($scope, $http, $location) { $scope.fileSelected = function (element) { $scope.files = element.files; } }); <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <body dir="rtl" ng-app="pniotApp" ng-controller="pniotCtrl"> <input id="uploadFile" type="file" class="filestyle" data-classButton="btn btn-primary" multiple data-input="false" data-classIcon="icon-plus" onchange="angular.element(this).scope().fileSelected(this)" data-buttonText="עיון..."> <ul> <li ng-repeat="file in files">{{file.name}}</li> </ul> </body> console.log($scope.files[0].name); What can be the reason that in the the list doesn't appear?