search

Home  >  Q&A  >  body text

angular.js - How to design routing with SpringMVC+Angular, using more than index.html as the entry point from multiple pages

SpringMVC Angular makes complex applications, which are generally not single-page applications. If you want to continue using Angularjs, how should you design routing? This is my first contact and I feel very confused. Please give me some advice.

PHP中文网PHP中文网2774 days ago841

reply all(3)I'll reply

  • 迷茫

    迷茫2017-05-15 16:51:18

    http://ued.taobao.org/blog/2014/04/xtpl/

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-15 16:51:18

    You can use angularjs’ own routing module, as follows:
    angular.module('myApp',['ngRoute']).config('$routeProvider',
    function($routeProvider){
    $routeProvider.when("url",{
    templateUrl: '',
    controller: ''
    }).otherwise({
    redirectTo : 'url'
    })
    }
    );
    If this is not enough, you can learn ui-router: https://github.com/angular-ui/ui-router, which is more powerful.

    reply
    0
  • 天蓬老师

    天蓬老师2017-05-15 16:51:18

    ANGULAR SPA + JERSEY + SPRINGMVC integrated application This article explains it very clearly

    http://www.liaozhida.net/angular/angular-spa-jersey-springmvc-%E6%95%B4%E5%90%88%E5%BA%94%E7%94%A8.html

    reply
    0
  • Cancelreply