AngularJS - How to list the filenames from a given folder?

15,042

Angular is a client side library. Getting files from file directories is a backend capability.

Share:
15,042
Harsha Vardhan
Author by

Harsha Vardhan

Updated on July 05, 2022

Comments

  • Harsha Vardhan
    Harsha Vardhan almost 2 years

    I have this folder/directory 'x' in the public folder of my application. Now I have path name till the folder i.e., /path/to/dir/x , but I don't know the names of the files in this directory. Now I need to provide URL links to the files in the html a tag's href attribute.

    How do I list the name of the files in this directory?

  • GKFX
    GKFX about 8 years
    Welcome to StackOverflow! Thanks for this answer, but that's already been said in the first comment, so this doesn't add anything.
  • Sandor Rozsa
    Sandor Rozsa over 6 years
    Wrong! We have now 2017. We are using angular in electron that is running locally on desktop. So using the file system is a valid question.
  • palimboa
    palimboa over 5 years
    @SandorRozsa So is it possible?