在项目里定义了一个interface,device.ts。然后在component.ts中要使用这个interface,import之后,VSCode报错:‘xxx/xxx/xxx/device.ts’ is not a module。
搞了半天还是没找到解决办法。后来终于在StackOverflow上找到了解决办法,那就是——重新npm start或者ng serve!!!
重启大法果然好用啊!!!?
在项目里定义了一个interface,device.ts。然后在component.ts中要使用这个interface,import之后,VSCode报错:‘xxx/xxx/xxx/device.ts’ is not a module。
搞了半天还是没找到解决办法。后来终于在StackOverflow上找到了解决办法,那就是——重新npm start或者ng serve!!!
重启大法果然好用啊!!!?