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

Component import in generated Angular module has file type ending #333

Closed
MrCube42 opened this issue Oct 28, 2019 · 0 comments
Closed

Component import in generated Angular module has file type ending #333

MrCube42 opened this issue Oct 28, 2019 · 0 comments

Comments

@MrCube42
Copy link
Contributor

Describe the bug
The ES6 import of the component in the generated Angular module has a .ts ending which should be avoided.

import { MyComponent } from './components/my.component.ts'

To Reproduce
Steps to reproduce the behavior:

  1. npm start to launch the app.
  2. Navigate to the editor http://localhost:4200/#/editor
  3. Select any example
  4. Switch to code generation (<>)
  5. Select the tabs Angular and xlayers.module.ts.

Expected behavior
The file type ending in ES6 module import should be avoided.

import { MyComponent } from './components/my.component'

Screenshots
xlayers-bug

Sketch (please complete the following information):

  • not relevant

Desktop (please complete the following information):

  • not relevant

Smartphone (please complete the following information):

  • not relevant

Additional context
The error occurs in method renderImports (beginning line 120) in angular-codegen.service.ts where the import statements are build. Here the file.uri has the .ts ending. This should either be capped or instead of the file uri the filename itself should be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants