У меня есть лицензия на версию ag-grid-enterprise, но я не нашел, как ее разместить и как импортировать предприятие в мой проект angular2.Проект Angular2 ag-grid-enterprise, выпущенный при размещении Лицензионного ключа
я пытаюсь разместить лицензию в main.ts файл с licensemanager В , а также поместить версию предприятия в package.json и systemjs.config.json
, но я получаю сообщение об ошибке, как
systemjs.config.js:
'ag-grid': 'node_modules/ag-grid',
'ag-grid-ng2': 'node_modules/ag-grid-ng2',
'ag-grid-enterprise': 'node_modules/ag-grid-enterprise'
'ag-grid': {
defaultExtension: "js"
},
'ag-grid-ng2': {
defaultExtension: "js"
},
'ag-grid-enterprise': {
defaultExtension: "js"
}
Package.json
"dependencies": {
"ag-grid": "7.1.x",
"ag-grid-enterprise": "7.1.x",
"ag-grid-ng2": "7.1.x",
"@angular/common": "2.4.x",
"@angular/compiler": "2.4.x",
"@angular/compiler-cli": "2.4.x",
"@angular/core": "2.4.x",
"@angular/http": "2.4.x",
"@angular/forms": "2.4.x",
"@angular/platform-browser": "2.4.x",
"@angular/platform-browser-dynamic": "2.4.x",
"@angular/platform-server": "2.4.x",
"@angular/router": "3.4.x",
"rxjs": "5.0.x",
"zone.js": "0.7.x",
"core-js": "2.4.x",
"systemjs": "0.19.27",
"bootstrap": "3.3.6",
"jquery": "3.1.1"
},
"devDependencies": {
"@types/node": "6.0.45",
"concurrently": "2.2.0",
"typescript": "2.0.3",
"rimraf": "2.5.x",
"gulp": "3.9.1",
"lite-server": "2.2.2",
"systemjs-builder": "0.15.33",
"copyfiles": "1.0.x",
"ncp": "2.0.x",
"@types/selenium-webdriver": "2.53.33",
"http-server": "^0.9.0",
"canonical-path": "0.0.2",
"jasmine-core": "2.4.1",
"karma": "1.3.0",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-jasmine": "1.0.2",
"karma-jasmine-html-reporter": "0.2.2",
"karma-systemjs": "0.16.0",
"protractor": "4.0.13",
"webdriver-manager": "10.2.5"
}
main.ts
import {LicenseManager} from "ag-grid-enterprise/main";
LicenseManager.setLicenseKey("your license key");
«Ошибка: Ошибка: ошибка XHR (404 Not Found) загрузка http://localhost:3000/node_modules/ag-grid в XMLHttpRequest.wrapFn [как _onreadystatechange] (http://localhost:3000/node_modules/zone.js/dist/zone.js:1039:29) [] в Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:151:47) [= >] в XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:345:33) [] Ошибка при загрузке http://localhost:3000/node_modules/ag-grid как "AG-сетки" из http://localhost:3000/node_modules/ag-grid-enterprise/dist/lib/menu/enterpriseMenu.js в addToError (http://localhost:3000/node_modules/systemjs/dist/system.src.js:123:78) [] на linkSetFailed (http://localhost:3000/node_modules/systemjs/dist/system.src.js:726:21) [] при[] в Zone.run (http://localhost:3000/node_modules/zone.js/dist/zone.js:113:43) [=>] в http://localhost:3000/node_modules/zone.js/dist/zone.js:535:57 [] в Zone.runTask (http://localhost:3000/node_modules/zone.js/dist/zone.js:151:47) [=>] в drainMicroTaskQueue (http://localhost:3000/node_modules/zone.js/dist/zone.js:433:35) [] на XMLHttpRequest.ZoneTask.invoke (http://localhost:3000/node_modules/zone.js/dist/zone.js:349:25) []»
попытаться обратиться к реальным AG-сетки основного JS-файла. 'пакеты: { // ... Гаврилович-сетка ': { основные: 'main.js' } }' –
@TiepPhan означает Гаврилович-сетку' ': { основные:«main.js " },' – NunnaS
thanx @TiepPhan теперь работает – NunnaS