I have a Separate NodeJS RESTful api and Separate angular 4 interface. Can I pass data that are submitted from the interface to RESTful api by giving path?
I have a Separate NodeJS RESTful api and Separate angular 4 interface. Can I pass data that are submitted from the interface to RESTful api by giving path?
You tried call make an service like as :
import {Injectable} from '@angular/core';
import {Http, Response} from '@angular/http';
import {Observable} from 'rxjs/Rx';
@Injectable()
export class YourService {
constructor(private http:Http) { }
// Uses http.get() to communicate with NodeJs
getSomeThing() {
return this.http.get('yourAPIUrl').map((res:Response) => res.json());
}
}