I'm trying to use angularjs routing to load my templates and am getting a '404 page not found error' no matter what templateurl I put down. Should I be changing my context.xml file or am I just missing a step here? Any input would be appreciated.
This is my routing config (app.js):
app.config(function($routeProvider) {
$routeProvider.when('/', {
templateUrl: 'views/mainview',
controller: 'appController'
})
.otherwise({
redirectTo: '/'
});
});
=============================
And my Spring Controller is as follows (SampleController.java):
@Controller
public class SampleController {
@RequestMapping(value="views/mainview", method=RequestMethod.GET)
public String displayView(){
return "views/mainview.jsp";
}
}
=============================
Folder structure is as Follows
java
- com
- sample
- controller
- SampleController.java
webapp
- META-INF
- resources
- js
- app.js
- WEB-INF
- views
- mainview.jsp