简体   繁体   English

角材料和流星的控制台错误

[英]Console Errors with Angular Material and meteor

Im using meteor to build a simple application based on the examples provided here: 我使用流星根据此处提供的示例构建一个简单的应用程序:

https://material.angularjs.org/latest/demo/tabs https://material.angularjs.org/latest/demo/tabs

When complied with meteor and with the relevant packages installed (angular-material, angular, angular-animate etc). 符合流星并已安装相关包装(角材料,角,角动画等)时。

However, and I have tried this on two computers with different installs, I am consistently getting this error in the chrome console when the website is compiled (it does so without errors in the meteor console). 但是,并且我已经在安装不同的两台计算机上尝试过这种方法,在编译网站时,我在chrome控制台中始终出现此错误(这样做的确在流星控制台中没有错误)。 It then does not switch between tabs and the errors appear with each click. 然后,它不会在选项卡之间切换,并且每次单击都会显示错误。

I looked at the solutions here, but I don't understand how this effects me as I am using meteors package manager.. 我在这里查看了解决方案,但是当我使用流星包管理器时,我不明白这对我有什么影响。

https://github.com/angular/angular.js/issues/11658 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 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: 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']);

Thanks in advance for your help! 在此先感谢您的帮助!

I had the exact same trouble myself. 我自己也遇到了同样的麻烦。

Updating my version of angular from 1.48 to 1.5.3_1 fixed this for me. 我将angular的版本从1.48更新到1.5.3_1为我解决了这个问题。

From command line: 从命令行:

meteor update angular:angular

Running that also updates the dependent animate and sanitize packages. 运行该命令还会更新相关的动画包和清理包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM