【问题标题】:I am trying to use mocha in angular 6 for testing and the following error comes, can test angular 6 using mocha我正在尝试在 angular 6 中使用 mocha 进行测试,但出现以下错误,可以使用 mocha 测试 angular 6
【发布时间】:2018-12-05 01:18:07
【问题描述】:
/home/sachin/workstation/kitcode/kitcode-frontend-fork/src/app/login/login.component.ts:1
(function (exports, require, module, __filename, __dirname) 

从 '@angular/core' 导入 { Component, OnInit, NgZone };

SyntaxError: 意外的令牌导入

【问题讨论】:

  • 我猜它的导入需要在函数之前进行?

标签: angular angular6


【解决方案1】:

从 '@angular/core' 导入 { Component, OnInit, NgZone };

导入前没有额外的{

【讨论】:

  • 没有多余的{
猜你喜欢
  • 1970-01-01
  • 2013-04-11
  • 1970-01-01
  • 2016-11-20
  • 2016-04-22
  • 2013-11-08
  • 1970-01-01
  • 2015-10-01
  • 2016-06-26
相关资源
最近更新 更多