Failed to load template:
Template is unable to load due to 2 reasons:
1. $routeProvider.when('/addStudent', {
templateUrl: '/addStudent.html',
controller: 'AddStudentController'
})
In the above templateUrl ,You are giving the wrong path.
Suppose your view location is Templates-> addStudent.html
then template url will be Templates/addStudent.html
2.
$routeProvider.when('/addStudent', {
templateUrl: 'Views/addStudent.html',
controller: 'AddStudentController'
})
You cant access static files from view folder in MVC.
If you want to do it then convert
to
or
put all your static views under other folder like templates
then your code will be
templateUrl: 'Templates/addStudent.html',