Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

App layout using MaterialListItemComponent throws exception #288

Closed
dougreese opened this issue Jul 6, 2018 · 1 comment
Closed

App layout using MaterialListItemComponent throws exception #288

dougreese opened this issue Jul 6, 2018 · 1 comment

Comments

@dougreese
Copy link

Using the app_layout_example code with MaterialListItemComponent included results in:

EXCEPTION: No provider found for DomService

Removing MaterialListItemComponent from the main app component directives list results in the error going away. This could easily be something I have done wrong in my project, so I took the base Stagehand Angular app and added the app layout example to it.

Full exception and stack trace in example:

https://github.com/dougreese/app_layout_example

@TedSander
Copy link
Contributor

The list item needs DomService which is an injectable.

The easiest way to get it is to add the materialProviders to your root. You can see that here:
https://webdev.dartlang.org/codelabs/angular_components/2-starteasy#--set-up-the-root-components-dart-file

Thanks for using angular_components.

dougreese added a commit to dougreese/app_layout_example that referenced this issue Jul 7, 2018
Added materialProviders to root component as suggested in issue
angulardart/angular_components#288
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants