Currently, I am utilizing Angular 5 for a project that involves the need to extract an AMP HTML file as plain text. The specific file is stored within a component and must be accessed solely from that component.
My primary goal is to have the capability to view the file in read-only mode by simply providing its name.
I am on the hunt for a solution resembling the following:
let file = open('amp.html');
Is this achievable? If not, what steps should I take to accomplish this task?