Unhandled Promise rejection: Template parse errors:'md-toolbar' is not a known element
Unhandled Promise rejection: Template parse errors:'md-toolbar' is not a known element:
What is the expected behavior?
Load the toolbar, toggle button, button and progressbar
What is the current behavior?
Unhandled Promise rejection: Template parse errors: 'md-toolbar' is not a known element:
- If 'md-toolbar' is an Angular component, then verify that it is part of this module. What are the steps to reproduce?
http://plnkr.co/edit/VkE5K7lXssLKbXH8VA8F?p=preview
Is there anything else we should know? My Project configuration
CoreModule (core.module.ts): can contain core modules like Preogressbar, DialogModule, ToastModule etc. Each core module have its own module file progressbar.module.ts, dialog.module.ts etc. In the app.module.ts I will refer only the core.module.ts.
The problem is that the MaterialModule is missing in your NgModule.
The root NgModule is located in the main.ts file and is responsible for bootstrapping the app.component.
@DevVersion This is the modified version of the plnkr based on your discussion. Is it the correct way ? http://plnkr.co/edit/jH7F1MsU6YaX8XtpoLNx?p=preview
@vkishorekumar80 Yeah now it works. Just to summarize how your NgModules should use the MaterialModule in beta.1
- The root
NgModule(inmain.ts) should use theMaterialModule.forRoot()syntax. - Child
NgModule's (as inprogressbar.module.ts) should useMaterialModulewithout theforRoot()
Also notice that in an upcoming release the forRoot will be unnecessary for all NgModule's.
@DevVersion Thank you very much for the information.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.