0

我正在关注 Telerik 的 Grid Overview 页面 ( http://www.telerik.com/kendo-angular-ui/components/grid/ )上的入门示例,并按照说明进行操作,但一直收到此错误:

GET http://localhost:3000/@progress/kendo-angular-intl 404(未找到)

我得到了一个可以工作的按钮,没问题,单击事件有效,并且蒙皮工作与他们的示例一样,但是我已经按照网格示例进行操作,并且网格给出了这个错误。

我已经尝试拉入@progress/kendo-angular-intl 并将其添加到我的 system.config.js 中,就像我添加按钮一样,但没有运气。我还尝试拉入图表并遇到与上述相同的问题。

我正在使用 Angular 2.0.0 版本,这是我的 package.json:

{
  "name": "myApp",
   "version": "1.0.0",
   "description": "myApp",
   "scripts": {
     "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
     "docker-build": "docker build -t ng2-quickstart .",
     "docker": "npm run docker-build && docker run -it --rm -p 3000:3000 -p      3001:3001 ng2-quickstart",
     "e2e": "tsc && concurrently \"http-server\" \"protractor      protractor.config.js\"",
     "lint": "tslint ./app/**/*.ts -t verbose",
     "lite": "lite-server",
     "postinstall": "typings install",
     "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
     "tsc": "tsc",
     "tsc:w": "tsc -w",
     "typings": "typings",
     "webdriver:update": "webdriver-manager update"
   },
   "keywords": [],
   "author": "",
   "license": "ISC",
   "dependencies": {
     "@angular/common": "2.0.0",
     "@angular/compiler": "2.0.0",
     "@angular/core": "2.0.0",
     "@angular/forms": "2.0.0",
     "@angular/http": "2.0.0",
     "@angular/platform-browser": "2.0.0",
     "@angular/platform-browser-dynamic": "2.0.0",
     "@angular/router": "3.0.0",
     "@angular/upgrade": "2.0.0",
     "@progress/kendo-angular-buttons": "^0.9.3",
     "@progress/kendo-angular-charts": "^0.5.1",
     "@progress/kendo-angular-grid": "^0.3.2",
     "@progress/kendo-angular-intl": "^0.4.1",
     "angular2-localstorage": "^0.4.0",
     "bootstrap": "^3.3.6",
     "chart.js": "^2.1.3",
     "es6-shim": "^0.35.0",
     "font-awesome": "^4.6.3",
     "primeng": "^1.0.0-beta.16",
     "primeui": "^4.1.15",
     "reflect-metadata": "^0.1.3",
     "roboto-font": "^0.1.0",
     "rxjs": "5.0.0-beta.12",
     "systemjs": "0.19.37",
     "zone.js": "^0.6.17"
   },
   "devDependencies": {
     "concurrently": "^2.2.0",
     "lite-server": "^2.2.0",
     "typescript": "^1.8.10",
     "typings": "^1.0.4"
   },
   "repository": {}
 }
4

3 回答 3

2

这是我的设置,网格现在正在为我工​​作。

我一开始遇到了同样的问题。

我为 intl 包运行了这个脚本。npm install --save cldr-data

这些设置一切正常。

屏幕截图:系统配置

屏幕截图:@progress 和 @telerik 的 node_modules 文件夹

希望这可以帮助。

于 2016-09-25T00:51:41.043 回答
2

我在玩网格时遇到了同样的错误。你必须在##systemjs.config.js##中添加一些配置,

 map: {
  // our app is within the app folder
  app: 'app',

  '@progress/kendo-angular-grid': 'npm:@progress/kendo-angular-grid',
  '@progress/kendo-angular-intl': 'npm:@progress/kendo-angular-intl',
  '@telerik/kendo-intl': 'npm:@telerik/kendo-intl',
},
 // packages tells the System loader how to load when no filename and/or no extension
packages: {
  app: {
    main: './main.js',
    defaultExtension: 'js'
  },
  'npm:@progress/kendo-angular-grid': {
    main: './dist/npm/js/main.js',
    defaultExtension: 'js'
  },
  'npm:@progress/kendo-angular-intl': {
    main: './dist/npm/js/main.js',
    defaultExtension: 'js'
  },
  'npm:@telerik/kendo-intl': {
    main: './dist/npm/js/main.js',
    defaultExtension: 'js'
  }
}

希望能帮助您解决您的问题。

于 2016-09-26T02:36:07.063 回答
0

我已经这样做了:

在我的项目根目录中安装了@telerik/kendo-intl。在我的 system.config.js 文件中,我添加了:

map: {
...........\\\\
'@telerik/kendo-intl': 'npm:@telerik/kendo-intl',
...........\\\\
},
packages: {
...........\\\\
'npm:@telerik/kendo-intl': {
 main: './dist/npm/js/main.js',
 defaultExtension: 'js'
 },
............\\\\
}

现在 Kendo Grid 是可见的,但在我的网页中没有 Kendo 样式。

编辑:我在添加样式后再次运行我的代码,Kendo Button 现在看起来像 Kendo Button 但 Kendo Grid 仍然不像 Kendo Grid。

于 2016-10-05T10:38:16.147 回答