First of all thank you for this awesome video.It would be really helpful for me if you can use angular4 in php right from the start.I am a bit confused regarding restful api calls on php as i am not sure if its mandatory to have a restful api pre made for the php applications or can it be done otherwise. Thanks & Regards! Abdul
Awesome video Junaid, But stuck on php response. The error I get is this: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at localhost/uidhtml-angular-website/server/admin/admin-login.php. (Reason: missing token ‘content-type’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel). If you look through these lines u will see "missing token ‘content-type’", I have added both Access Control, but in return, I get the error I have mentioned above. Although If I run php localhost I get json data. How to set Token to get the response from php. My angular 5 service code is this: return this._httpClient.post(url, formData[0]); // Passing form data Thanks again, for this great video.
I am trying to iterate data some other way for auto suggest. Could you please help me how can iterate it using *ng-for in data list. My data is like this: { "1": { "id": 1, "iso": "AF", "name": "AFGHANISTAN", "nicename": "Afghanistan", "iso3": "AFG", "numcode": 4, "phonecode": 93 }, "2": { "id": 2, "iso": "AL", "name": "ALBANIA", "nicename": "Albania", "iso3": "ALB", "numcode": 8, "phonecode": 355 }, "3": { "id": 3, "iso": "DZ", "name": "ALGERIA", "nicename": "Algeria", "iso3": "DZA", "numcode": 12, "phonecode": 213 }, } My app.component.html has below code:
It gives me below error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays. Could you please help me to resolve this issue ? Best Regards, Ashish B. Narola
Hi , Instead of getting whole data at a time. Pls get data as per the input entered by user in text box. I mean , help me to find a way to communicate with server for every change in input. Will be thankful forever.
Thanks a lot Junaid, great video
Ozzi Buy Thanks 😊
Download the source file from the following link given below:
github.com/junaidalamgithub/angular4-tutorial_codes/blob/master/autosuggest.zip
dead link
github.com/junaidalamgithub/angular4-tutorial_codes/blob/master/autosuggest.zip
thanks for repairing the link.
Please make a video on CRUDE oparation in angular 4 with PHP and MYSQL
Hi Malek, thanks for your suggestion. If my bandwidth permits then surely would try to come up with this tutorial :)
Thank you very much sir
First of all thank you for this awesome video.It would be really helpful for me if you can use angular4 in php right from the start.I am a bit confused regarding restful api calls on php as i am not sure if its mandatory to have a restful api pre made for the php applications or can it be done otherwise.
Thanks & Regards!
Abdul
please make a tutorial on Angular Universal with PHP.
Awesome video Junaid, But stuck on php response. The error I get is this:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at localhost/uidhtml-angular-website/server/admin/admin-login.php. (Reason: missing token ‘content-type’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel).
If you look through these lines u will see "missing token ‘content-type’", I have added both Access Control, but in return, I get the error I have mentioned above. Although If I run php localhost I get json data. How to set Token to get the response from php.
My angular 5 service code is this:
return this._httpClient.post(url, formData[0]); // Passing form data
Thanks again, for this great video.
I am trying to iterate data some other way for auto suggest. Could you please help me how can iterate it using *ng-for in data list.
My data is like this:
{
"1": {
"id": 1,
"iso": "AF",
"name": "AFGHANISTAN",
"nicename": "Afghanistan",
"iso3": "AFG",
"numcode": 4,
"phonecode": 93
},
"2": {
"id": 2,
"iso": "AL",
"name": "ALBANIA",
"nicename": "Albania",
"iso3": "ALB",
"numcode": 8,
"phonecode": 355
},
"3": {
"id": 3,
"iso": "DZ",
"name": "ALGERIA",
"nicename": "Algeria",
"iso3": "DZA",
"numcode": 12,
"phonecode": 213
},
}
My app.component.html has below code:
It gives me below error:
Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
Could you please help me to resolve this issue ?
Best Regards,
Ashish B. Narola
Can you do a vidoe with angular 4 and express
Well, not thought or planned for Angular 4 with express as of now since I have lots many topics still pending to complete the current series :)
Hi , Instead of getting whole data at a time. Pls get data as per the input entered by user in text box. I mean , help me to find a way to communicate with server for every change in input. Will be thankful forever.
You just need to modify the code to call the http service on change event of key stroke rather than load it upfront on application startup.