Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function () {
'use strict';
var baseUrl = $('base').attr('href');
var appBaseUrl = baseUrl + 'scripts/myApp/';
angular.module('myApp', ['ngRoute'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/list', {
templateUrl: appBaseUrl + 'partials/list.html',
controller: 'ListController'
}).
when('/details', {
templateUrl: appBaseUrl + 'partials/details.html',
controller: 'DetailsController'
}).
otherwise({
redirectTo: '/list'
});
}]);
})();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<base href='@Url.Content("~/")'>
<title>@ViewBag.Title - My ASP.NET Application</title>
<!-- ... -->
</head>
<body>
<!-- ... -->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment