Skip to content

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

Closed
@281330

Description

@281330
  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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions