Angular – tsconfig.json with Paths – to avoid using relative paths not stable

This topic contains 1 reply, has 2 voices, and was last updated by  support-swapna 1 year, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #544836 Reply



    I am trying the Angular IDE plugin, to perhaps switch out of Visual Code angular support.

    And my first contact with this plugin is that the support for NONE relative paths is not working very well.

    In particular, in a tiny angular startup, I have setup on typescript configuration as follows:
    “paths”: {
    “@app/*”: [“app/*”]

    Trying to refer to components starting with @app/path to component always works form a ng build point of view, but not from an eclipse ide point of view. ON the eclipse IDE this sometimes works, other times the project just gets all red with module cannot be found error, or the existing @Components being flagged red as if they had not be mentioned in any “module”.

    Sometimes doing a eclipse clean – helps resolve the issue – sometimes not.

    import {CoreConfigService} from ‘@app/services/config/coreconfig.service’;

    The project builds just fine, but is all red on all of the imports.

    I would recommend that this should be looked into, because projects that use relative paths from classes A to B are simply un-managable. Any properly written project will not be using relative paths except if the source code is in the same package alltogether.

    The import autocomplete, as well, I find it unusable. I have to type everything by myself.

    I am not sure if at this point in time visual code is simply not more stable for angular development. But It tends to look that way.

    Many thanks.

    #544852 Reply



    Thank you for trying Angular IDE. Sorry that you are seeing problems with using absolute paths.
    Currently the IDE supports absolute paths in the imports in the below format without the ‘@’ :
    import {CoreConfigService} from ‘app/services/config/coreconfig.service’;

    I have filed a bug for the dev team to allow importing project source dir as module. The dev team is already working on the autocomplete for Imports. We will keep you posted when the fix is out.

    Apologies for inconvenience caused. Please let us know if you see any other issues.

    MyEclipse Support

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Angular – tsconfig.json with Paths – to avoid using relative paths not stable

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.