NullInjectorError: No provider for FormBuilder!
avinashnxt opened this issue · 1 comments
I've created 3 applications using the module federation plugin. When I'm trying to create a form I'm getting the error
I'm using the demo provided in the below link to customize
https://github.com/ishedu/module-federation-angular
NullInjectorError: R3InjectorError(RestaurantModule)[FormBuilder -> FormBuilder -> FormBuilder -> FormBuilder]: NullInjectorError: No provider for FormBuilder!
So here there is the main app which is home and 2 sub apps restaurant and orders. So I'm loading the order page from restaurant module which is working as expected. But when I create a form in my order component it throws the above error. I have declared ReactiveFormsModule and FormsModule in both restaurant module and order module.
including @angular/forms in webpack config of order app fixed the issue