Skip to content

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

Description

@filipesilva

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!';
}

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions