【问题标题】:Angular 7 cli not reading custom ts fileAngular 7 cli不读取自定义ts文件
【发布时间】:2019-09-05 13:07:50
【问题描述】:

我正在尝试读取 Angular 7 组件中的自定义文件,但在服务器重新启动时失败,而组件 ts 文件中没有错误。

错误:

app/zontify-components/zontify-dynamic-field.directive.ts(5,29): 错误 TS2306:文件 'D:/Phython/zontify/Purchased/webmin/angular-7/src/src/app/field-interface.ts' 不是一个模块。 应用程序/zontify-components/zontify-select/zontify-select.component.ts(3,29): 错误 TS2307:找不到模块 'src/app/field-interface'。 app/zontify-lead/zontify-lead.component.ts(10,29): 错误 TS2306: 文件 'D:/Phython/zontify/Purchased/webmin/angular-7/src/src/app/field-interface.ts' 不是模块。

请让我知道我做错了什么?我是 Angular 7 的新手。

接口目录:

项目 > 应用程序 > field-interface.ts

【问题讨论】:

    标签: angular typescript interface angular7


    【解决方案1】:

    得到解决方案...我们需要使用文件的相对路径而不是绝对路径...

    【讨论】:

      猜你喜欢
      • 2017-09-01
      • 2017-11-04
      • 2021-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-18
      相关资源
      最近更新 更多