Grunt serve + PHP?

后端 未结 3 2097
Happy的楠姐
Happy的楠姐 2021-02-09 13:23

I\'m starting my first project with yo + grunt + angular.js.
I have a service which needs to read some data from my server; I built it using angular $http service. I\'ve als

3条回答
  •  遥遥无期
    2021-02-09 13:50

    It sounds like you are trying to do the same thing as me. ( solution for local development only)

    I am using yo angular to start an angular project, but I want to connect to a php service to deliver some content.

    I used grunt-connect-proxy to pass my post request to apache. This works well, except for the fact that $_POST remains empty when sending form-data e.g. $http.post('/api',{"foo":"bar"}). I posted an issue about this, but it still remains unsolved and I can not figure out how to make that work. Anyway, the other solution is to keep everything in the same folder/domain.

    That was my story

    Actually the story had a tail. Finally I figured out what was causing the problem, see this post

提交回复
热议问题