isaacplmann / ngx-contextmenu

An Angular component to show a context menu on an arbitrary component
MIT License
248 stars 91 forks source link

Can't bind to 'subMenu' since it isn't a known property of 'ng-template'. #243

Open raghav331 opened 2 years ago

raghav331 commented 2 years ago

Describe the bug The sub menu is failing when I do an production configuration bulid. "Compiling with Angular in legacy View Engine compilation mode. An unhandled exception occurred: Template parse errors: Can't bind to 'subMenu' since it isn't a known property of 'ng-template'.

  1. If 'subMenu' is an Angular directive, then add 'CommonModule' to the '@NgModule.imports' of this component.
  2. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" Multiply function <ng-template *ngIf="this.treetype!='input'" [ERROR ->][subMenu]="convertSubMenu"> Convert "

To Reproduce Steps to reproduce the behavior:

  1. I have a component that uses the context menu(as an npm package)
  2. I have referred the context menu component in another project
  3. normal builds are working fine
  4. When i try to do and ng build --configuration production , I get this error