Closed ranlandau closed 6 years ago
<context-menu #idMenu>
`
Why?
That's the error you get if you're not importing the context menu module into the module where you're using the component.
On Dec 14, 2017 4:54 AM, "Ran Landau" notifications@github.com wrote:
Hi,
Every time i run npm run build i get this:
ERROR in : 'context-menu' is not a known element:
- If 'context-menu' is an Angular component, then verify that it is part of this module.
- If 'context-menu' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
[ERROR ->]<context-menu #idMenu> <ng-template contextMenuItem passive
these are my dependencics "@angular/animations": "^5.0.0", "@angular/cdk": "^5.0.1", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/material": "^5.0.1", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.7", "@ngui/auto-complete": "^0.13.2", "angular-in-memory-web-api": "^0.5.2", "angular2-multiselect-dropdown": "^2.1.4", "aws-sdk": "^2.135.0", "bootstrap": "^4.0.0-alpha.6", "codemirror": "^5.25.2", "core-js": "^2.4.1", "css-loader": "^0.26.4", "express": "^4.15.2", "font-awesome": "^4.7.0", "jquery": "^3.2.1", "jsgrid": "^1.5.3", "jsoneditor": "^5.6.0", "loaders.css": "^0.1.2", "moment": "^2.18.1", "ng2-codemirror": "^1.1.3", "ngx-bootstrap": "2.0.0-beta.11", "ngx-contextmenu": "^3.0.2", "ngx-modialog": "^5.0.0", "ngx-popover": "0.0.16", "ngx-select2": "^0.1.3", "rxjs": "^5.5.2", "sass-loader": "^6.0.3", "systemjs": "0.19.47", "ts-helpers": "^1.1.1", "zone.js": "^0.8.14"
This is my component code
import { ContextMenuComponent, ContextMenuService } from 'ngx-contextmenu'; @ViewChild(ContextMenuComponent) public idMenu: ContextMenuComponent;
html code `<div [innerHTML]="htmlString | sanitizeHtml" (mouseup)="showSelectedText($ event)">
<context-menu #idMenu>
<identification-context-menu [word]="selectedText" [eventResultId]="eventResultId" [taggedSentence]="taggedSentence" [synonyms]="synonymsList">
`
Why?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/isaacplmann/ngx-contextmenu/issues/81, or mute the thread https://github.com/notifications/unsubscribe-auth/AA0lQHiVlkkgVl_4VSVZ0hTO6MnospkKks5tAPBBgaJpZM4RBzUT .
Closing due to inactivity. Please reopen if you're still having this problem.
Hi,
Every time i run npm run build i get this:
ERROR in : 'context-menu' is not a known element:
[ERROR ->]<context-menu #idMenu> <ng-template contextMenuItem passive
these are my dependencics
"@angular/animations": "^5.0.0", "@angular/cdk": "^5.0.1", "@angular/common": "^5.0.0", "@angular/compiler": "^5.0.0", "@angular/core": "^5.0.0", "@angular/forms": "^5.0.0", "@angular/http": "^5.0.0", "@angular/material": "^5.0.1", "@angular/platform-browser": "^5.0.0", "@angular/platform-browser-dynamic": "^5.0.0", "@angular/router": "^5.0.0", "@ng-bootstrap/ng-bootstrap": "1.0.0-beta.7", "@ngui/auto-complete": "^0.13.2", "angular-in-memory-web-api": "^0.5.2", "angular2-multiselect-dropdown": "^2.1.4", "aws-sdk": "^2.135.0", "bootstrap": "^4.0.0-alpha.6", "codemirror": "^5.25.2", "core-js": "^2.4.1", "css-loader": "^0.26.4", "express": "^4.15.2", "font-awesome": "^4.7.0", "jquery": "^3.2.1", "jsgrid": "^1.5.3", "jsoneditor": "^5.6.0", "loaders.css": "^0.1.2", "moment": "^2.18.1", "ng2-codemirror": "^1.1.3", "ngx-bootstrap": "2.0.0-beta.11", "ngx-contextmenu": "^3.0.2", "ngx-modialog": "^5.0.0", "ngx-popover": "0.0.16", "ngx-select2": "^0.1.3", "rxjs": "^5.5.2", "sass-loader": "^6.0.3", "systemjs": "0.19.47", "ts-helpers": "^1.1.1", "zone.js": "^0.8.14"
This is my component code
import { ContextMenuComponent, ContextMenuService } from 'ngx-contextmenu'; @ViewChild(ContextMenuComponent) public idMenu: ContextMenuComponent;
html code `<div [innerHTML]="htmlString | sanitizeHtml" (mouseup)="showSelectedText($event)">