Skip to content

Generated Component wrong? #1142

@rburnham52

Description

@rburnham52
  1. OS? Windows 10
  2. Versions. Please run ng --version. If there's nothing outputted, please
    angular-cli: 1.0.0-beta.6
    node: 4.2.6
    os: win32 x64
  3. I ran ng init to create a new project, then after ran ng g component my-component. The resulting files were created

app/my-component/shared/index.ts
app/my-component/index.ts
app/my-component/my-component.component.css
app/my-component/my-component.component.html
app/my-component/my-component.component.spec.ts
app/my-component/my-component.component.ts

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

not applicable

  1. Mention any other details that might be useful.
    why is there an index.ts and a shared index.ts? This seems to be the same as the initial app structure. I can see app\shared being useful to shared code between components but whats the point of having a shared folder inside a component? in addition to this isn't the my-component.components.ts the entry point to the component, why is app/my-component/index.ts needed?

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