angular 2-5 中是否有任何选项可以命名模块文件夹路径?
Is there any option to namespace a module folder path in angular 2-5?
在 Angular 5 中有什么方法可以为自定义路径使用命名空间吗?
目前我使用
import { AuthService } from './../../modules/auth/auth.service';
我想要实现的是对特定路径使用 @module
或自定义 @name
。代码应如下所示,并且可用于每个文件夹级别
import { AuthService } from '@modules/auth/auth.service';
是的,tsconfig.json
配置中有paths
属性:
{
...
"compilerOptions": {
...
"paths": {
"@core/*": ["app/core/*"],
"@shared/*": ["app/shared/*"]
}
}
在 Angular 5 中有什么方法可以为自定义路径使用命名空间吗? 目前我使用
import { AuthService } from './../../modules/auth/auth.service';
我想要实现的是对特定路径使用 @module
或自定义 @name
。代码应如下所示,并且可用于每个文件夹级别
import { AuthService } from '@modules/auth/auth.service';
是的,tsconfig.json
配置中有paths
属性:
{
...
"compilerOptions": {
...
"paths": {
"@core/*": ["app/core/*"],
"@shared/*": ["app/shared/*"]
}
}