我正在使用Angular CLI.如何转换路径:
import {AppConfig,AppConfigInterface} from '../../../app.config';
类似于:
import {AppConfig,AppConfigInterface} from 'root/app.config';
在tsconfig.json中尝试这个:
原文链接:https://www.f2er.com/angularjs/141401.html{ "compileOnSave": false,"compilerOptions": { "outDir": "./dist/out-tsc","sourceMap": true,"declaration": false,"moduleResolution": "node","emitDecoratorMetadata": true,"experimentalDecorators": true,"target": "es5","typeRoots": [ "node_modules/@types" ],"lib": [ "es2017","dom" ],"paths": { "@services/*": ["app/services/*"] // here! } } }