Angular Material 和 meteor 的控制台错误
Console Errors with Angular Material and meteor
我正在使用流星基于此处提供的示例构建一个简单的应用程序:
https://material.angularjs.org/latest/demo/tabs
当符合 meteor 并安装相关包时(angular-material、angular、angular-animate 等)。
但是,我已经在两台安装不同的计算机上进行了尝试,在编译网站时,我一直在 chrome 控制台中收到此错误(它在 meteor 控制台中没有错误)。然后它不会在选项卡之间切换,每次单击都会出现错误。
我查看了此处的解决方案,但我不明白这对我有何影响,因为我正在使用 meteors 包管理器..
https://github.com/angular/angular.js/issues/11658
TypeError: runner.setHost is not a function
at angular-animate.js:2686
at Scope.$digest (angular_angular.js?hash=c17a5a9…:15961)
at Scope.$apply (angular_angular.js?hash=c17a5a9…:16175)
at angular_angular.js?hash=c17a5a9…:17942
at completeOutstandingRequest (angular_angular.js?hash=c17a5a9…:5567)
at angular_angular.js?hash=c17a5a9…:5844(anonymous function) @ angular_angular.js?hash=c17a5a9…:12535(anonymous function) @ angular_angular.js?hash=c17a5a9…:9307Scope.$digest @ angular_angular.js?hash=c17a5a9…:15963Scope.$apply @ angular_angular.js?hash=c17a5a9…:16175(anonymous function) @ angular_angular.js?hash=c17a5a9…:17942completeOutstandingRequest @ angular_angular.js?hash=c17a5a9…:5567(anonymous function) @ angular_angular.js?hash=c17a5a9…:5844
angular_angular.js?hash=c17a5a9…:12535 TypeError: animationRunner.done is not a function
at Array.triggerAnimationStart (angular-animate.js:3075)
at nextTick (angular-animate.js:423)
at scheduler (angular-animate.js:393)
at angular-animate.js:3087
at Scope.$digest (angular_angular.js?hash=c17a5a9…:15961)
at Scope.$apply (angular_angular.js?hash=c17a5a9…:16175)
at angular_angular.js?hash=c17a5a9…:17942
at completeOutstandingRequest (angular_angular.js?hash=c17a5a9…:5567)
at angular_angular.js?hash=c17a5a9…:5844
main.html
<head>
<title>simple</title>
</head>
<body ng-app= 'myApp'>
<div ng-cloak>
<md-content>
<md-tabs md-dynamic-height md-border-bottom>
<md-tab label="one">
<md-content class="md-padding">
<h1 class="md-display-2">Tab One</h1>
<p>...</p>
</md-content>
</md-tab>
<md-tab label="two">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Two</h1>
<p>...</p>
</md-content>
</md-tab>
<md-tab label="three">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Three</h1>
<p>...</p>
</md-content>
</md-tab>
</md-tabs>
</md-content>
</div>
</body>
main.css:
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import ngMaterial from 'angular-material';
//import ngAnimate from 'angular-animate';
//import ngAria from 'angular-aria';
var app = angular.module('myApp', ['ngMaterial']);
在此先感谢您的帮助!
我自己也遇到过同样的麻烦。
将我的 angular 版本从 1.48 更新到 1.5。3_1 为我解决了这个问题。
从命令行:
meteor update angular:angular
运行 也更新依赖的动画和清理包。
我正在使用流星基于此处提供的示例构建一个简单的应用程序:
https://material.angularjs.org/latest/demo/tabs
当符合 meteor 并安装相关包时(angular-material、angular、angular-animate 等)。
但是,我已经在两台安装不同的计算机上进行了尝试,在编译网站时,我一直在 chrome 控制台中收到此错误(它在 meteor 控制台中没有错误)。然后它不会在选项卡之间切换,每次单击都会出现错误。
我查看了此处的解决方案,但我不明白这对我有何影响,因为我正在使用 meteors 包管理器..
https://github.com/angular/angular.js/issues/11658
TypeError: runner.setHost is not a function
at angular-animate.js:2686
at Scope.$digest (angular_angular.js?hash=c17a5a9…:15961)
at Scope.$apply (angular_angular.js?hash=c17a5a9…:16175)
at angular_angular.js?hash=c17a5a9…:17942
at completeOutstandingRequest (angular_angular.js?hash=c17a5a9…:5567)
at angular_angular.js?hash=c17a5a9…:5844(anonymous function) @ angular_angular.js?hash=c17a5a9…:12535(anonymous function) @ angular_angular.js?hash=c17a5a9…:9307Scope.$digest @ angular_angular.js?hash=c17a5a9…:15963Scope.$apply @ angular_angular.js?hash=c17a5a9…:16175(anonymous function) @ angular_angular.js?hash=c17a5a9…:17942completeOutstandingRequest @ angular_angular.js?hash=c17a5a9…:5567(anonymous function) @ angular_angular.js?hash=c17a5a9…:5844
angular_angular.js?hash=c17a5a9…:12535 TypeError: animationRunner.done is not a function
at Array.triggerAnimationStart (angular-animate.js:3075)
at nextTick (angular-animate.js:423)
at scheduler (angular-animate.js:393)
at angular-animate.js:3087
at Scope.$digest (angular_angular.js?hash=c17a5a9…:15961)
at Scope.$apply (angular_angular.js?hash=c17a5a9…:16175)
at angular_angular.js?hash=c17a5a9…:17942
at completeOutstandingRequest (angular_angular.js?hash=c17a5a9…:5567)
at angular_angular.js?hash=c17a5a9…:5844
main.html
<head>
<title>simple</title>
</head>
<body ng-app= 'myApp'>
<div ng-cloak>
<md-content>
<md-tabs md-dynamic-height md-border-bottom>
<md-tab label="one">
<md-content class="md-padding">
<h1 class="md-display-2">Tab One</h1>
<p>...</p>
</md-content>
</md-tab>
<md-tab label="two">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Two</h1>
<p>...</p>
</md-content>
</md-tab>
<md-tab label="three">
<md-content class="md-padding">
<h1 class="md-display-2">Tab Three</h1>
<p>...</p>
</md-content>
</md-tab>
</md-tabs>
</md-content>
</div>
</body>
main.css:
import angular from 'angular';
import angularMeteor from 'angular-meteor';
import ngMaterial from 'angular-material';
//import ngAnimate from 'angular-animate';
//import ngAria from 'angular-aria';
var app = angular.module('myApp', ['ngMaterial']);
在此先感谢您的帮助!
我自己也遇到过同样的麻烦。
将我的 angular 版本从 1.48 更新到 1.5。3_1 为我解决了这个问题。
从命令行:
meteor update angular:angular
运行 也更新依赖的动画和清理包。