Answer by ammy for How to connect Angular 2 and a php backend (mysql)
why don't you use observables.. i have used php as a backend in one my dummy project. here is its code.ngOnInit() { let body=Path+'single.php'+'?id='+ this.productid; console.log(body);...
View ArticleAnswer by danday74 for How to connect Angular 2 and a php backend (mysql)
RE YOUR CODEthis.http.get('app/php/search.php').toPromise() .then((response) => { console.log(response); // does it look right? // is it in string format or json format? // if its in string format...
View ArticleHow to connect Angular 2 and a php backend (mysql)
So I understand and know how ajax works, as I've used it before. But how do I retrieve JSON data from a php script?I've tried to echo the json_encode results (which works) but I get an EXCEPTION:...
View Article
More Pages to Explore .....