14 April, 2021
0 Comments
1 category
After an Angular 11 update, the code:
<markdown
[data]=“model.someText”></markdown>
would throw an exception “Can’t bind to ‘data’ since it isn’t a known property of ‘markdown'” only in production builds.
Fixed this by adding
@NgModule({
...
imports: [
...
...
MarkdownModule.forRoot(),
],
...
})
export class AppModule {}
In the AppModule en in de Module containing the component with the template using the “markdown” tag, added:
@NgModule({
...
imports: [
...
, MarkdownModule.forChild()
],
...
})
export class CoreModule { }
Category: Uncategorized