Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there an easy way to do absolute imports (avoid ../../../) with the default generated project? #1543

Closed
281330 opened this issue Aug 3, 2016 · 4 comments

Comments

@281330
Copy link

281330 commented Aug 3, 2016

  1. OS? Windows 8.1
  2. Versions. angular-cli: 1.0.0-beta.10, node: v6

My src folder has the following structure:

app
--feature1
--feature2
----shared
------components
--------uniqueComponent1
--shared
----components
------sharedComponent1
----services
main.ts
system-config.ts
tsconfig.json
typings.d.ts

If I am in feature2/shared/components/uniqueComponent1, and I want to import sharedComponent1,

is there a way I can do this without having to do ../../../ many times and instead do something like

import { SharedComponent1 } from 'app/shared/components/sharedComponent1';

Please let me know.

@clydin
Copy link
Member

clydin commented Aug 3, 2016

There will be. See here: #1465

@281330
Copy link
Author

281330 commented Aug 4, 2016

@clydin does the typescript paths only work in typescript 2?

@filipesilva
Copy link
Contributor

This issue is being tracked in #1465.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants