My Angular 4 application is running under web server and contains the 
following code:

export class HelloWorldComponent implements OnInit {

  results: string[];
  constructor(private http: HttpClient) {
    console.log (`HelloWorldComponent constructor`);

  ngOnInit(): void {
    console.log (`HelloWorldComponent ngOnInit`);
    // Make the HTTP request:
    this.http.get('/api/items').subscribe(data => {
      // Read the result field from the JSON response.
      this.results = data['results'];


This code has to send http request (http.get) to another application 
running on the same PC in a different port.

The reason:
The other application is a C++ agent that has to respond to hardware 
interrupts and collect telemetry from the PC's hardware.
Upon http request from angular 2, it sends back a response contains 
relevant information according to the request. 

How can I do it ?

Thank you,

You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to