How to pass data from AngularJS frontend to Nodejs backend?

前端 未结 4 1907
滥情空心
滥情空心 2020-12-04 18:29

I have some angular js code here.




  
             


        
4条回答
  •  暖寄归人
    2020-12-04 19:11

    First of all, create a RESTful service using Express/Restify which are npm modules, based on your needs which will in turn talk to your SQL database.

    Once the service is up and running at the server-level, you are now ready to send/receive data to/from the server at the client-level.

    Note: Make use of $resource instead of $http service of AngularJS for talking to the server.

    https://docs.angularjs.org/api/ngResource/service/$resource

提交回复
热议问题