title: read data from a json file using Angular http get
body: <pre><code>constructor(private http:HttpClient){
      this.http.get('http://localhost:81/{path}/loginResult.json/data')
              .subscribe(result =&gt; this.data = result);
              console.log(this.data);
  }
  </code></pre>
  <p>my loginResult.json</p>
  <pre><code>{&quot;data&quot;:&quot;logged successully&quot;}
  </code></pre>
  <p>I try to get corresponding value of data , but I got errors, how to do it correctly</p>
  <p>Access to XMLHttpRequest at 'http://localhost:81/{path}/loginResult.json' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource</p>