【问题标题】:Angular 6 - TypeError: this.driver.matchesElement is not a function at TransitionAnimationEngine.processLeaveNode (browser.js:2985)Angular 6 - TypeError:this.driver.matchesElement 不是 TransitionAnimationEngine.processLeaveNode 的函数(browser.js:2985)
【发布时间】:2019-01-13 11:28:05
【问题描述】:

注意:这不是this error。也尝试了该错误中提到的解决步骤。

我的 Angular 6 应用程序出现以下错误

ERROR TypeError: this.driver.matchesElement is not a function
at TransitionAnimationEngine.processLeaveNode (browser.js:2985)
at TransitionAnimationEngine.flush (browser.js:3021)
at InjectableAnimationEngine.AnimationEngine.flush (browser.js:3858)
at eval (animations.js:365)
at ZoneDelegate.invoke (zone.js:388)
at Zone.run (zone.js:138)
at NgZone.runOutsideAngular (core.js:4708)
at AnimationRendererFactory.end (animations.js:363)
at DebugRendererFactory2.end (core.js:15153)
at ViewRef_.detectChanges (core.js:11623)

【问题讨论】:

    标签: angular6


    【解决方案1】:

    @angular/core 和 @angular/animations 应该是相同的版本。 特别是在 package.json 中的包名中寻找“^”符号。

    应该是

    "@angular/core": "6.0.5", "@angular/animations": "6.0.5",

    不喜欢

    "@angular/core": "6.0.5", "@angular/animations": "^6.0.5",

    来自https://stackoverflow.com/a/52348690/1881626

    【讨论】:

      【解决方案2】:

      确保您使用与核心相比相同版本的角度/动画。

      【讨论】:

      • 我的情况是一样的
      • @KyleBurkett 我们在使用最新版本的角度动画时遇到了一些问题,所以回滚到 6.0.5 npm install --save @angular/animations@6.0.5
      猜你喜欢
      • 2019-05-27
      • 1970-01-01
      • 1970-01-01
      • 2019-02-22
      • 2018-12-13
      • 2018-12-15
      • 1970-01-01
      • 2019-01-01
      • 1970-01-01
      相关资源
      最近更新 更多