So to get you started. Here is an Tip I created to help with all those Angular script woes.
In your page you can do this in the scripts at the bottom to add angular module to your page:
@section Scripts {
<script>
angular.module('miniSpa', ['ngRoute']).config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/#main', { controller: "spaController", templateUrl: '/Partials/Home/Main.html' });
$routeProvider.otherwise({ redirectTo: '/#main' });
}])
.controller('spaController', ['$scope', spaController]);
function spaController($scope) {
$scope.hello = "Hello";
}
</script>
}
If you just want Angular for data-binding, which I do quite often:
<div ng-app="page">
<div ng-controller="pageController">
<h1>{{ hello }}</h1>
</div>
</div>
@section Scripts {
<script>
angular.module('page', [])
.controller('pageController', ['$scope', pageController]);
function pageController($scope) {
$scope.hello = "hello";
}
</script>
}