I have this angular service called tourSevice.js:
var service = angular.module('tourtService', []);
service.factory('Tournament', function($http)
{
return {
doLogin: function(token)
{
return $http.get('/api/tournament/user/' + token);
}
};
});
Here is my main app page, which holds all the includes:
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/angular-route/angular-route.min.js"></script>
<script src="../bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="../js/services/loginService.js"></script>
<script src="../js/services/tourService.js"></script> <!-- not included -->
<script src="../js/controllers/loginController.js"></script>
<script src="../js/controllers/homeController.js"></script> <!-- not included -->
<script src="../js/controllers/AppController.js"></script>
<head>
<title>Application</title>
</head>
<body ng-app="myApp" ng-controller="appCtrl">
<div class="container">
<div ng-view></div>
</div>
</body>
</html>
But in my chrome dev tools in the page source I see this (some scripts are not included):
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css">
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="js/controllers/loginController.js"></script>
<script src="js/services/loginService.js"></script>
<script src="js/controllers/AppController.js"></script>
<head>
<title>Application</title>
</head>
<body ng-app="myApp" ng-controller="appCtrl">
<div class="container">
<div ng-view></div>
</div>
</body>
</html>
No error thrown regarding that this files are missing from the provided path. Angular throws exception because this js files are missing.
What is wrong with it?
Update
Here is my main app js:
var myApp = angular.module('myApp', ['ngRoute', 'loginService', 'tourService']);
myApp.config(function($routeProvider, $locationProvider)
{
$locationProvider.html5Mode(true);
$routeProvider
.when('/', {templateUrl: 'pages/loginView.html'})
.when('/home', {templateUrl: '/pages/home.html'})
.otherwise({templateUrl: '/pages/loginView.html'});
//.when('/login', {templateUrl: 'pages/loginView.html'});
});
betsApp.controller('appCtrl', function($scope)
{
});
As was said in the comments I mad a huge mistake. I was changing the wrong file, there were 2 very similar index.html files one located in the public folder (the one I was changing) and the one located in the app/view folder (this is Laravel project). In order for the changes to take place I had to change the file in app/view and not the file in the public folder.
Sorry for wasting your time because of my inattentiveness.