Skip to content

Import renaming for components with the same name not working on NgModule #10538

@filipesilva

Description

@filipesilva

I'm submitting a ... (check one with "x")

[x] bug report

Current behavior
If you have 2 components with the same name (but with different selectors etc), import by renaming the export and add them to the declaration array of an NgModule, only the first one is rendered.

Expected/desired behavior
Both components should be rendered on the app.

Reproduction of the problem
http://plnkr.co/edit/LxH6fzJ08GfwVYLz9y2A?p=preview
Switch order of GoodHeroComponent and EvilHeroComponent to see the bug (only the first is displayed).

What is the motivation / use case for changing the behavior?
A user should be able to rename imports and use components with the same class name.

Please tell us about your environment:

  • Angular version: 2.0.0-rc.5
  • Browser: Chrome 52
  • Language: TypeScript 1.8

/cc @IgorMinar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions