javascript - Script tag not seen in html source -
i have 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 main app page, holds 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 chrome dev tools in page source see (some scripts 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 files missing provided path. angular throws exception because js files missing.
what wrong it?
update
here 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 said in comments mad huge mistake changing wrong file, there 2 similar index.html files 1 located in public folder (the 1 changing - in avail) , 1 located in app/view folder (this laravel project). in order changes take place had change file in app/view , not file in public folder.
sorry wasting time because of inattentiveness.
Comments
Post a Comment