Skip to content

ng g component my-component adds Backslashes on app.module.ts on Windows #2132

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

Closed
4lador opened this issue Sep 15, 2016 · 5 comments
Closed

Comments

@4lador
Copy link

4lador commented Sep 15, 2016

Please provide us with the following information:

Environment :

Windows 10
angular-cli: 1.0.0-beta.14
node: 6.3.1
os: win32 x64

Reproduce

  1. App created on Windows, using angular-cli@webpack ng new newapp.
  2. Creating and moving to another folder inside the app root folder : mkdir app/feature && cd app/feature
  3. Creating a new component using the angular-cli@webpack ng g component my-component

Error

Module not found: Error: Can't resolve './feature
egister-form/register-form.component' in 'E:\Dev\Learning\shooping-angular2\src\app'

Helpful informations

Details : On Windows, in the app.module.ts, the path is created using a backslash as first char after the current path.

import { RegisterFormComponent } from './feature\register-form/register-form.component';

should become:

import { RegisterFormComponent } from './feature/register-form/register-form.component';

@LucasReSilva
Copy link

Same here

Environment :

angular-cli: 1.0.0-beta.11-webpack.8
node: 6.5.0
os: win32 x64

@mbaljeetsingh
Copy link

The issue is still there with the cli beta 15

angular-cli: 1.0.0-beta.15
node: 4.4.6
os: win32 x64

Anybody looking into it?

@celliott181
Copy link
Contributor

celliott181 commented Sep 29, 2016

It'd be really nice if we could get a quick response from the team acknowledging this issue. This isn't some breaking bug, but given the cross-platform nature, proper path generation is more an expected functionality than a nice to have feature.

@filipesilva
Copy link
Contributor

Dupe of #1719, already fixed.

@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

5 participants