https://angular.tw/tutorial/toh-pt2
我已經在heroes.component.ts 裏輸入了import {HEROES} from ‘…/mock-heroes’;,但是仍然告訴我’HEROES’ refers to a value, but is being used as a type here. 而且我的mock-heroes.ts已經放了在app資料夾裏面。請問怎樣解決?
我是在visual studio code 打了code,然後另存ts檔案,是否我創立元件方法有錯? 所以就不用使用?
import {HEROES} from ‘…/mock-heroes’; Visual Studio Code 告訴我’HEROES’ is declared but its value is never read. ts(6133)
thank you very much.
下面張圖是我電腦的檔案: