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

Adding a route doesn't add imports to app component #840

Closed
filipesilva opened this issue May 19, 2016 · 6 comments
Closed

Adding a route doesn't add imports to app component #840

filipesilva opened this issue May 19, 2016 · 6 comments

Comments

@filipesilva
Copy link
Contributor

filipesilva commented May 19, 2016

On the latest master, and on Windows machines, adding a route doesn't add imports to the App Component.

Repro steps on a windows machine:

ng new foo
cd foo
ng build
ng g r my-route
ng build # this will fail compilation

At this point, foo.component.ts looks like this (note the missing imports):

import { Component } from '@angular/core';

@Component({
  moduleId: module.id,
  selector: 'foo-app',
  templateUrl: 'foo.component.html',
  styleUrls: ['foo.component.css']
,
  directives: [ROUTER_DIRECTIVES],
  providers: [ROUTER_PROVIDERS]
})
export class FooAppComponent {
  title = 'foo works!';
}
@3gcodes
Copy link

3gcodes commented May 19, 2016

Seems to add them correctly on OSX.

@filipesilva
Copy link
Contributor Author

@Brocco also tried on OSX, and reported it was fine. Not sure why it happens on my windows machine though.

@st-clair-clarke
Copy link

I logged this issue almost at week ago and no one cared to comment at #830

I am happy that someone else logged the issue because I have been stucked since waiting for some resolution.

I note that @gdboling and @Brocco tried it on OSX and it worked, but some of us do use Windows on which it does NOT work. All other commands worked as expected, but not the route command. I hope that authors will look into this issue sooner rather than later.

Cheers

@filipesilva
Copy link
Contributor Author

@st-clair-clarke apologies, going over the issue backlog has been a slow process and only now am I getting this far. I'll close your issue in favor of this one, just because it has more feedback in it.

@filipesilva
Copy link
Contributor Author

Closed in favor of #911

@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 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants