Problem With passive="true": string not assignable to boolean
bcwhite-code opened this issue · comments
@perfectmemory/ngx-contextmenu: ^15.1.1
typescript: ~4.9.4
I'm using Angular 15 and was just starting to make a menu following the examples:
<context-menu #nodeContextMenu>
<ng-template contextMenuItem passive="true">
<span class="menu-item-title">Node Actions</span>
</ng-template>
<ng-template contextMenuItem (execute)="false;">nothing</ng-template>
</context-menu>
This breaks the Angular build with the error:
error TS2322: Type 'string' is not assignable to type 'boolean'.
<ng-template contextMenuItem passive="true">
~~~~~~~
I tried passive=true
(same error), passive="1"
(same error), [passive]="true"
(no error but doesn't seem to work, either).
Hi @bcwhite-code,
As you can see here, it is a really standard input, nothing fancy, so maybe there is a problem in the setup of your project. Could you provide a stackblitz with a minimum viable reproduction of your problem please ?
Hmmm... Okay. Thanks for the info. In the end, it didn't provide the interface I wanted (which was do a select while holding right-button down) so I ended up writing my own.