I'm not sure what these are called but I want to create a custom annotation for imports. For example, I can do the following anywhere in my project:
import { SomeComponent } from '@app/components/some.component';
I'm talking about the @app
part. No matter what file I'm in, @app
will always take me to the src/app
folder. How do I make my own?
If I had a file inside project/foo/bar/myfile.ts
, how can I create an annotation that says @bar
which takes them to the "bar" folder no matter where they are in the project folder structure.
I want to be able to do this:
import { MyFile } from '@bar/myfile';
Any help would be appreciated. Thank you!