Avoiding relative paths in Angular CLI

后端 未结 7 1067
-上瘾入骨i
-上瘾入骨i 2020-11-30 20:54

I\'m using the latest Angular CLI, and I\'ve created a custom components folder which is a collection of all components.

For example, TextInputComponent

7条回答
  •  孤街浪徒
    2020-11-30 21:20

    In Angular 8, no need for the *. The * will cause error of Cannot find module add this to you tsconfig.json file

    "baseUrl": "./",
    "paths": {
          "@test": [ "src/app/test/" ],
          "@somthing": [ "src/app/something/" ],
          "@name": [ "src/app/name/" ]
        },
    
    

提交回复
热议问题