I am creating a dynamic template URL using the following code How to use variable to define templateUrl in Angular2, but I need to use a datepicker in the template and I had problems to add the Angular UI Bootstrap library (Angular 2 version). The error is
"No provider for NgbDateParserFormatter"
I added NgbModule and FormsModule to the section imports
@NgModule({
imports: [CommonModule, NgbModule.forRoot(), FormsModule ],
declarations: [DynamicHtmlComponent]
})
class DynamicHtmlModule {}
I created a plunker version https://plnkr.co/edit/kWoSTi?p=preview
If the field date in the file src/articles/first.html
is uncommented the application doesn´t work.