Skip to content

Usage in other modules #2173

@montella1507

Description

@montella1507

Bug, feature request, or proposal:

Bug?

What is the expected behavior?

  1. import Angular 2 material module in ROOT (main/app module) with MaterialModule.forRoot()
  2. Use compoments in every module, which is imported in Main/App module

What is the current behavior?

If i use Material components in another module, it wont find a known element

What are the steps to reproduce?

Just try to use NG2 material component in other module that main / app

Which versions of Angular, Material, OS, browsers are affected?

Win 10 x64, Angular-CLI 22-1, Angular 2.2.3

Is there anything else we should know?

Is it correct to rly provide only way to import NG2 module for root? Shall we just import Material module in out "Shared" module which is shared in every other module??

I think this strange behavior ( bug) could be because of changes in angular CLI in latest versions.. (Maybe the custom decorator are stripped?).

What is the correct usage of NG2 material if we have multiple Modules and we wish tu use NG2 material in each of them?

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