I have been searching the web for solutions but cant't find any that will solve my problem. I am trying to do client side routing with AngularJS and MVC.
This is the Plunker that I am using for guide lines but it does not help me. My MVS2 Project folder structure is as follows: $root/Views/Home/Home.html
The error I get that the page could not be found. What am I missing here?
AngularJS
// create the module and name it myApp
var myApp= angular.module('myApp', ['ngRoute']);
// configure our routes
myApp.config(function ($routeProvider) {
$routeProvider.when('/', {templateUrl: 'Home.html',controller: 'mainController'})
});
// create the controller and inject Angular's $scope
scotchApp.controller('mainController', function ($scope) {
// create a message to display in our view
$scope.message = 'Home Page should appear here';
});
HTML
<html data-ng-app="myApp">
<head runat="server">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
</head
<body data-ng-controller="mainController">
<div id="Div1">
<div data-ng-view></div>
</div>
</body>
</html>