Angularjs 使用ng视图时,会出现滚动错误

Angularjs 使用ng视图时,会出现滚动错误,angularjs,Angularjs,第一次使用ng view和Angular,在Angular js和ng view的新应用程序中,我遇到了所有这些scrollTo错误。我怎样才能解决这个问题?我检查了StackOverflow和Google,找不到解决方案。即使是Angular seed应用程序,我也有同样的问题 控制台错误 TypeError: Property 'scrollTo' of object [object global] is not a function at scroll (http://localh

第一次使用ng view和Angular,在Angular js和ng view的新应用程序中,我遇到了所有这些scrollTo错误。我怎样才能解决这个问题?我检查了StackOverflow和Google,找不到解决方案。即使是Angular seed应用程序,我也有同样的问题

控制台错误

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) 
var app = angular.module('app', ['Controllers', 'Directives', 'Services']);
angular.module('Controllers', []);
angular.module('Directives', []);
angular.module('Services', []);
controllers.js

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) 
var app = angular.module('app', ['Controllers', 'Directives', 'Services']);
angular.module('Controllers', []);
angular.module('Directives', []);
angular.module('Services', []);
directions.js

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) 
var app = angular.module('app', ['Controllers', 'Directives', 'Services']);
angular.module('Controllers', []);
angular.module('Directives', []);
angular.module('Services', []);
services.js

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) 
var app = angular.module('app', ['Controllers', 'Directives', 'Services']);
angular.module('Controllers', []);
angular.module('Directives', []);
angular.module('Services', []);

简短的研究表明,问题可能是chrome弹出窗口拦截器,禁用他可能会解决问题。请尝试在除Chrome以外的任何浏览器中运行您的应用程序,如果您看到其他行为,请禁用弹出窗口阻止程序

希望有帮助


干杯

自2011年以来未被开发人员触及,因此它似乎不会很快被修复。

请提供引发此错误的代码!编辑了这个问题。没有特定的代码,它只是一个新的应用程序和引导。我只有在使用ng-view时才会出现这些错误。这就成功了,应该放在文档中。你在找什么?我花了好几个小时搜索。谷歌“TypeError:Property'scrollTo'of object[object global]”,第一个是关于Motools的,然后谷歌搜索了“AngularJS”,这个()再次是关于弹出窗口拦截器的。我很高兴我们解决了你的问题,祝你有愉快的一天