<!DOCTYPE html>
<html lang="en">
<base href="/">
<head>
<meta charset="UTF-8">
<title>AngularJs</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<script src="bower_components/angular/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
</head>
<body ng-app="Application" ng-controller="MainCtrl">
<div class="container">
<div ng-view></div>
</div>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!--App-->
<script src="js/app.js"></script>
<!--Controller-->
<script src="js/controllers/MainController.js"></script>
<!--Services-->
<script src="js/services/get.js"></script>
</body>
</html>
app.js :
var app = angular.module('Application', ['ngRoute']);
app.config(function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(true);
$routeProvider
.when('/', {
controller: 'MainCtrl',
templateUrl: 'views/app.html'
})
.when('/photo/:id', {
controller: 'PhotoCtrl',
templateUrl: 'views/photo.html'
})
.otherwise({
redirectTo: '/'
});
});
PhotoController :
app.controller('PhotoCtrl', ['$scope', 'photos', '$routeParam', function ($scope, photos, $routeParam) {
photos.success(function (data) {
$scope.detail = data[$routeParam.id];
});
}]);
Ошибка :
Помогите найти где что не так сделал ? скорей всего думаю что не да подключил.
Server: Xampp.