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

Wrong environment path generated in transloco-root.module when adding transloco with ng add if module path is not the default path #332

Closed
dorthrithil opened this issue Aug 24, 2020 · 2 comments
Labels
bug Something isn't working PRs welcome

Comments

@dorthrithil
Copy link

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[X] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

When adding transloco with the following command the generated environment import path is wrong in transloco-root.module:

ng add @ngneat/transloco --module app/some/path/app.module

The generated import is:

import {environment} from '../../environments/environment';

Expected behavior

The correct import is:

import {environment} from '../../../../environments/environment';

Minimal reproduction of the problem with instructions

  • Setup a new angular project and try to add transloco to a module that is not at the default app.module location.

Environment


Angular version: 9.0.7
 
For Tooling issues:
- Node version: v13.7.0
- Platform:  Mac
@dorthrithil dorthrithil changed the title Wrong environment path generated when adding transloco with ng add if module path is not the default path Wrong environment path generated in transloco-root.module when adding transloco with ng add if module path is not the default path Aug 24, 2020
@itayod
Copy link
Contributor

itayod commented Sep 3, 2020

@dorthrithil seems like a bug, would you like to create a pr that fix it?

@dorthrithil
Copy link
Author

I would love to, I put it on my list. But I cannot promise when I will get to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PRs welcome
Projects
None yet
Development

No branches or pull requests

3 participants