'How to disable angular detection for assets folder

Am developing an angular application with spring boot as a back end, i wanted to make an upload to a local stockage in my PC. I made a Stockage folder in the assets folder of angular, because angular can't read files only from there. And when i upload the files it goes directly to the stockage folder in the assets and the angular can read it perfectly, the problem is that I can't find a better place to put the local stockage that angular could read it without restrictions, and when I upload a file the angular detect the changes and load the page from the first. Am searching for any solutions among these, either I disable the angular detection for any new changes and specially for a specific folder, or how can I make angular read any file from the PC outside the project.

This is the project where i put the Storage folder in the assets, so that the angular can read and show the files in that folder. But I want angular don't detect the changes in the Storage Folder, Or if it's possible how can I make angular read and show files of an outer folder.



Solution 1:[1]

Angular Don't allow to display any image or to read any file out of the project, more precisely out of the assets folder mention in the angular-cli.json. The problem is you can't upload files while the application is running, so then it will detect the changes and it will reload the page, so you can't finish the editing. The Solution is to work in production mode or to simulate production mode. when launching the application use this command ng serve ng serve ----live-reload=false instead of ng serve. In default the application is using live reload = true, and this refresh the page from the first. It's a little hack for demos, it'll be always detecting changes, but not refreshing the page until you do it manually. Hope you other solution. And please mention it here to get it useful.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Hadj Sassi Mahdi