Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typescript/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 7 cli未读取自定义ts文件_Angular_Typescript_Interface_Angular7 - Fatal编程技术网

Angular 7 cli未读取自定义ts文件

Angular 7 cli未读取自定义ts文件,angular,typescript,interface,angular7,Angular,Typescript,Interface,Angular7,我正在尝试读取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' 不是一个模块。 app/zontify component

我正在尝试读取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' 不是一个模块。 app/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' 不是一个模块

请让我知道我做错了什么?我是新来的

接口目录:

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


找到解决办法了。。。我们需要使用文件的相对路径而不是绝对路径…

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