What is the difference between declarations, providers, and import in NgModule?

Angular Concepts imports makes the exported declarations of other modules available in the current module declarations are to make directives (including components and pipes) from the current module available to other directives in the current module. Selectors of directives, components or pipes are only matched against the HTML if they are declared or imported. providers … Read more

Use component from another module

The main rule here is that: The selectors which are applicable during compilation of a component template are determined by the module that declares that component, and the transitive closure of the exports of that module’s imports. So, try to export it: @NgModule({ declarations: [TaskCardComponent], imports: [MdCardModule], exports: [TaskCardComponent] // <== export the component you … Read more