angular.js - Are there any examples of using AngularJS and spring to separate front-end and back-end development? introduce
PHPz
PHPz 2017-05-15 16:51:49
0
1
776

Recently I am learning to use AngularJS in conjunction with back-end development. Can anyone who has used it introduce it or give a simple example to learn from?

PHPz
PHPz

学习是最好的投资!

reply all(1)
巴扎黑

The java side is completely deprecatedjsp改为开发api,返回jsondata

Then the view has a separate res folder to store the angular project. It is actually a pure front-end and can be placed anywhere and run across domains

Just negotiate the API between both ends

  • update
  1. This is the front-end directory structure, the folder is called webapp
  2. This is the directory under the backend main
  • About deployment
    When deploying, you can directly create a war包发布就可以了吧,因为是前后端分离的,你部署可以只考虑后端啊,前端放在哪里应该都一样的,我这个是放在java项目下面,其实后端在远端服务器,这个webapp directory on the backend and put it on your own computer to solve cross-domain problems. It can also run because it has been separated
  • About running
    If you want to access, you only need to access the front-end html page, because angular is obtained from the back-endjson数据,整体打包跑tomcat或者单独把webapp拿出来跑nginxIt should be fine

ps: I am not doing Java. This is a project that is not convenient for you. If you have any questions, you can continue to ask.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template