Connecting MYSQL database to AngularJS with PHP

651 views
Skip to first unread message

Ryan Romanosky

unread,
Jun 19, 2013, 10:39:29 AM6/19/13
to ang...@googlegroups.com
I'm trying to connect to a MySql database with AngularJS via php. I have the data in the php file encoded in JSON, and when I open the php file it displays the data in JSON format. However, when I try to connect Angular with the php file via get(), it just displays blank (but present) divs.

Here's my plunker. http://plnkr.co/edit/u2bQXil5TShxpksi90k4?p=preview

P.S. I realize that you won't be able to see the data, but I'm hoping it's something simple and I'm just missing it.

Sameer

unread,
Jun 20, 2013, 6:00:00 AM6/20/13
to ang...@googlegroups.com
plunk not found

Spas Bobchev

unread,
Jun 20, 2013, 6:50:38 AM6/20/13
to ang...@googlegroups.com
Try setting a 'application/json' response header.
Reply all
Reply to author
Forward
0 new messages