angularjs - angular route template not found 404 -
hi when run spring angular app showing get http://localhost:8080/cyclone/admin/admin/cycle 404 (not found)
. don't have idea second admin came on url.
access url <a href="#/cycle">cycle</a>
, html page under web-inf/views/admin/cycle.html
angular root setup
app.config(['$routeprovider', function ($routeprovider) { $routeprovider.when('/cycle', { templateurl: 'admin/cycle.html', controller: 'cyclecontroller' }); }]);
my spring controller
@controller @requestmapping(value = "/admin") public class admincontroller { @requestmapping("/cycle.html") public string getcarpartialpage() { return "admin/cycle"; } }
change code below
$routeprovider.when('/cycle', { templateurl: 'cycle.html', controller: 'cyclecontroller'
});
and in spring controller
@requestmapping(value = "/cycle.html", method = requestmethod.get) public string getcarpartialpage() { return "admin/cycle"; }
Comments
Post a Comment