title: How can I get text from txt URL ? How can I use Filereader from Angular 7?
body: <p>“Iwant to get text data from txt url, and fetch it in angular web. How can I get text from txt URL ? How can I use Filereader from Angular 7 ???”</p>
  
  <p>“This is for Angular 7 .”</p>
  
  <pre><code>&lt;a (click)="getTextFile()"&gt;Check&lt;/a&gt; 
  </code></pre>
  
  <pre><code>import {Component} from '@angular/core';
  import {FormControl} from '@angular/forms';
  import {Observable} from 'rxjs';
  import {map, startWith} from 'rxjs/operators';
  import {
    HttpClient,
    HttpRequest,
    HttpResponse,
    HttpParams,
    HttpHeaders
  } from '@angular/common/http';
  
  
  
  
  @Component({
    selector: 'autocomplete-overview-example',
    templateUrl: 'autocomplete-overview-example.html',
    styleUrls: ['autocomplete-overview-example.css'],
  })
  export class AutocompleteOverviewExample {
   text:any;
  
    constructor(
       private http: HttpClient,
    ) {
  
    }
  
  
    getTextFile():void{
    this.http.get('https://creamson-intelli.slack.com/files/UFL3QQFP0/FL4N4SNFJ/young_ruskin_bond.txt').subscribe((data) =&gt; {
      this.text=data;
      console.log(this.text);
  })
  }
  } 
  </code></pre>