First time using ng-view with Angular and on a fresh application of angular js with ng-view I am having all these scrollTo errors. How can I fix this? Ive checked StackOverflow and Google and cannot find a solution. Even the Angular seed app I am having the same issues.
Console errors
TypeError: Property 'scrollTo' of object [object global] is not a function
at scroll (http://localhost/angular/lib/angular.js:2946:26)
at Object.Scope.$eval (http://localhost/angular/lib/angular.js:8685:28)
at Object.Scope.$digest (http://localhost/angular/lib/angular.js:8548:23)
at Object.Scope.$apply (http://localhost/angular/lib/angular.js:8771:24)
at http://localhost/angular/lib/angular.js:986:15
at Object.invoke (http://localhost/angular/lib/angular.js:2873:25)
at resumeBootstrapInternal (http://localhost/angular/lib/angular.js:984:14)
at bootstrap (http://localhost/angular/lib/angular.js:998:12)
at angularInit (http://localhost/angular/lib/angular.js:959:5)
at http://localhost/angular/lib/angular.js:16310:5 angular.js:6173
TypeError: Property 'scrollTo' of object [object global] is not a function
at scroll (http://localhost/angular/lib/angular.js:2946:26)
at <error: illegal access>
at Object.Scope.$broadcast (http://localhost/angular/lib/angular.js:8935:28)
at http://localhost/angular/lib/angular.js:7960:26
at wrappedCallback (http://localhost/angular/lib/angular.js:7303:59)
at wrappedCallback (http://localhost/angular/lib/angular.js:7303:59)
at http://localhost/angular/lib/angular.js:7340:26
at Object.Scope.$eval (http://localhost/angular/lib/angular.js:8685:28)
at Object.Scope.$digest (http://localhost/angular/lib/angular.js:8548:23)
at Object.Scope.$apply (http://localhost/angular/lib/angular.js:8771:24)
Updated with what I have in my files, as you see its just fresh app.
index.html
<!doctype html>
<html lang="en" ng-app="app">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<title>Mobile App</title>
<link href="css/default.css" rel="stylesheet" type="text/css">
<link href="css/bootstrap-min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div ng-view></div>
<!--<script src="lib/angular-min.js"></script>-->
<script src="lib/angular.js"></script>
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
<script src="js/directives.js"></script>
<script src="js/services.js"></script>
</body>
</html>
app.js
var app = angular.module('app', ['Controllers', 'Directives', 'Services']);
controllers.js
angular.module('Controllers', []);
directives.js
angular.module('Directives', []);
services.js
angular.module('Services', []);
brief research shows that the problem is, probably, the chrome popup blocker, disabling him may solve the problem. Please try to run your app in any browser but Chrome, and if you see other behaviour, just dissable the pop-up blocker.
Hope that helps.
Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With