Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • the javascript code in your angular app runs in the browser, not on the server, so that code cannot copy files or require the 'fs' library. That work needs to be done by code running on the server. that example code is node.js code - so it would have to be part of the node.js application (possibly using express) - your angular application would need to make some type of request to the nodejs application to trigger that code. Commented Apr 17, 2020 at 5:25
  • Angular is a client side framework. Which means it runs on browser and you should not expect an API from angular to access on disc. Do it with Api service with sending parameters Commented Apr 17, 2020 at 10:02