-
1 votesanswersviews
如何将angular2-material(alpha 8.2)与angular2-Quickstart应用程序集成
NOTE: I don't use Angular-CLI 这个plunker正在使用 Alpha-8.1 : https://plnkr.co/edit/qoZ3YCwSz0mQ5o974Dt0?p=preview 我的快速启动应用程序运行没有任何问题 . Step 1 :我更新了 package.json 以包含 angular2-material 和 angular2-button 包 .... -
5 votesanswersviews
使用Clarity设计系统构建Angular 2应用程序
将Clarity Design System从官方tutorial添加到angular 2 5min quickstart后,我收到此错误 . 浏览器中的错误's console doesn' t帮助太多了,有什么建议吗? zone.js:1382 GET http://localhost:3000/clarity-angular 404 (Not Found) Error: (SystemJS)... -
0 votesanswersviews
错误:(SystemJS)XHR错误(404 Not Found)加载ag-grid-ng2
复制粘贴https://github.com/ceolter/ag-grid-ng2-example中项目的一个组件的代码后,我有以下错误: “错误:(SystemJS)XHR错误(404未找到)loading http://localhost:3000/ag-grid-ng2/main(...)” 我在我的component.ts文件中有以下内容: import {AgGridNg2} from... -
1 votesanswersviews
angular 2 typescript TS2307找不到私有npm包的模块
我一直在尝试创建一些内部公司使用的组件,以便通过我们的私有npm存储库共享 . 但是,当通过npm和systemjs将这些添加到应用程序时,我不断得到TS2307无法找到模块异常 . 我使用angular.io快速入门来创建这个简单的测试 . 我已经为import语句和systemjs'map'和'packages'部分尝试了各种名称变体,但是无法按照@angular或rxjs等加载模块 . 当我... -
1 votesanswersviews
404使用Angular2,angular2-websocket和typings
... import {$WebSocket} from "angular2-websocket/angular2-websocket"; @Injectable() export class DeviceService { private logger:Logger; private ws:$WebSocket; constructor( ... -
5 votesanswersviews
Angular 2.2和SystemJS:部署RXJS
我正在部署一个网站,但由于我使用的是Angular的最终版本,因此我无法使用rxjs . 我只能通过在我的网站上复制整个文件夹 node_modules/rxjs 来部署rxjs . 这是我对SystemJS的配置 System.config({ map: { 'lodash':'http://127.0.0.1/js/lodash.min.js', ... -
0 votesanswersviews
SystemJS:如何为内部依赖项添加文件扩展名?
有Angular 2应用程序,使用typescript进行编码,使用SystemJS进行模块加载 . //sydtemjs.config.js (function (global) { System.config({ map: { 'normalizr': 'node_modules/normalizr/dist/src/index.js' //mappin... -
4 votesanswersviews
(SystemJS)XHR错误@ angular / commobundles / common.umd.js / http未找到
我在我的应用程序中发出一个简单的http请求 . 我正在使用Angular 2 Quickstart并将所有角度包更新为4.3.4 这是我的 package.json { "name": "angular-quickstart", "version": "1.0.0", "... -
0 votesanswersviews
具有不同basePath的Karma配置
我正在使用Karma和Angular 4,系统js config设置单元测试 . 我尝试使用以下Karma配置,但未能加载所有节点模块,表示模式不匹配 . Application structure 仪表板 应用程序 -- app.component.html -- app.component.ts -- app.component.spec.ts -- user.c... -
9 votesanswersviews
如何在angular2组件中导入npm包?
我正在努力学习ng2的绳索,依赖注射系统正在扼杀我 . 我正在使用ng快速入门:https://github.com/angular/quickstart/blob/master/README.md 我正在尝试将此软件包导入应用程序:https://www.npmjs.com/package/arpad . 我通过npm update安装了包,我的package.json依赖项如下所示: &quo... -
8 votesanswersviews
如何让我的Angular 2应用程序与桶文件导入一起使用?
我正在尝试遵循Angular 2风格指南04-10创建和导入桶在这里找到:https://angular.io/docs/ts/latest/guide/style-guide.html 当我运行我的应用程序时,angular现在尝试加载一个不存在的文件:“my-component-name-here.js” . 为了说明这个问题,我修改了Angular 2示例应用程序以使用一个桶文件,它现在也引... -
5 votesanswersviews
使用systemjs导入位于应用程序文件夹外的共享服务,该应用程序位于typescript中的angular 2应用程序中
我在以下结构中有两个角度2应用程序: /应用/ APP1/ APP2/共享 在我的angular 2组件(用typescript编写)中,我导入了几个模块(位于同一个文件夹中),没有任何问题:从'./test1.service'导入; 但是,当我尝试从共享文件夹导入某些内容时,它无法在运行时(浏览器)加载所需的模块 . 从'../shared/test2.service'导入;浏览器说:http:... -
13 votesanswersviews
如何将文档注入systemjs-builder以捆绑角度4.0.0应用程序?
我正在尝试捆绑一个有角度的4.0.0应用程序 . 我已经尝试过browserify但是新的angular-loader插件(允许不需要带有templateUrl的组件中的moduleId)不会被调用,因此模板最终会出错路径 . 所以我转移到了systemjs-builder,但问题是当它运行该插件时崩溃说文档没有定义 . 有没有办法将文档注入构建器? 或者我做错了什么? 这是我正在测试的简单构建器... -
3 votesanswersviews
更新到systemjs-angular-loader.js后的404s
我正在更新我的Angular项目并决定删除 moduleId: module.id 的所有实例,因为文档指示我到这里:https://angular.io/docs/ts/latest/guide/change-log.html 删除了所有提及的moduleId . 删除了“组件相对路径”菜谱(2017-03-13)我们在我们推荐的SystemJS配置中添加了一个新的SystemJS插件(sys... -
2 votesanswersviews
编译 生产环境 版本时出现Angular2 AOT问题 - app模块问题
编译 生产环境 版本时出现Angular2 AOT问题 - app模块问题 我正在使用angular2,typescript,html5和systemjs 这是我正在使用的angular2种子应用程序:https://github.com/mgechev/angular-seed 当我这样做git bash命令时:npm运行serve.prod.exp,为AOT创建一个构建包 . 然后我在git... -
1 votesanswersviews
可以't import ' baconjs'进入Angular 2服务
我正在使用angular-cli创建一个新的Angular 2项目 . 我正在尝试添加'baconjs'npm项目,但没有成功 . 我按照这里的说明进行操作:https://github.com/angular/angular-cli/wiki/3rd-party-libs npm和typings安装工作查找 . 更改angular-cli-build.js文件会导致'vendor/baconjs... -
4 votesanswersviews
Angular 5 - 在运行时动态加载模块(在编译时未知)
Angular 5是否可以加载在编译时未知但在运行时动态的模块/组件? 我想这可能无法使用webpack但可能使用system.js? 编辑: 整个想法是构建一个基于插件的应用程序,其中单个插件被放入插件文件夹中,angular将自动选择它,而无需重新编译和部署整个角度应用程序 . 插件是独立的功能 . 当然有路线导航等 . 意味着一旦角度理解有一个新的插件,它应该添加一些动态导航,以便用户将能够... -
1 votesanswersviews
无法部署lodash
我和lodash有麻烦了 . 当我使用gulp部署时,我总是出现同样的错误: vendors.min.js:3 GET http://127.0.0.1/projects/myproject/lodash 404 (Not Found) 我将库声明为 index.html 文件 <script src="node_modules/lodash/lodash.js">... -
1 votesanswersviews
Lodash在SystemJS Angular 2 app中杀死了Karma
我正在使用Lodash,“npm run start”可用于构建和启动应用程序 . 然而,当我尝试用“npm run test”运行Karma时,它会在Lodash上窒息 . 有任何想法吗? 这是错误: 404: /base/node_modules/lodash/index.js Chrome 55.0.2.883 (Windows 7) ERROR {"origina... -
2 votesanswersviews
桶进口似乎打破了加载订单
我有一个组件,我正在尝试进行单元测试,但我不断收到这些错误,具体取决于我的import语句: Error: Cannot resolve all parameters for 'MyComponent'(undefined, FormBuilder). TypeError: Cannot read property 'toString' of undefined 我的组件有2个参数,一个是Fo... -
0 votesanswersviews
将SheetJS集成到Angular 4 SystemJS(angular-seed)时出错
我正在使用Angular 4和SystemJS的这个种子项目(angular-seed) 并希望使用SheetJS导出Excel文件 . 我按照说明,可以导入xlsx罚款,但是当导出文件时它不断返回错误: XLSX.utils.aoa_to_sheet is not a function 我已经添加到project.config.ts中 ... { name: 'xlsx', ... -
0 votesanswersviews
升级Angular项目
我正在将Angular项目从Angular 2 rc4升级到当前版本,即2.4.4 . 我已经在另一个内部项目中完成了这项工作,但是当我这样做时,我遇到了一些奇怪的错误 . 我已经升级了所有角度包,以及typescript,zone.js,rxjs和新的@types模块 . 我的systemjs.config.js文件如下所示: var System; (function(global) { ... -
6 votesanswersviews
Angular 2中的多个模块
我有一个Angular 2应用程序(RC7),它作为单个组件开始,但很快就会以各种不同(有时甚至是完全不相关)的方式在整个项目中使用 . 因此,单个 NgModule 引导所有组件似乎是一个可怕的想法与巨大的膨胀 . 我正在努力寻找一种方法来拥有多个模块(模块A将包含组件A,模块B将包含组件B等),并且仍然允许在单个页面上引导多个A2应用程序 . 在实践中,我想要实现的是: Page 1 boot... -
1 votesanswersviews
SystemJS - ES6模块加载器 - 导入过多的层次结构
我刚刚开始使用SystemJS和ES6模块加载器 . 我有一个简单的测试模块: var Feature = { init : function(){ console.log("Feature.init"); } }; export {Feature}; 然后导入 System.import('js/feature.js').then(funct... -
2 votesanswersviews
ES6 SystemJs - 为什么我必须使用.js扩展名来导入es6模块?
为什么我必须使用.js扩展名来导入带有systemjs的es6模块?例如: import { multiplier } from "adder.js"; // ok import { double, square } from 'modules'; // error var timesTwo = multiplier(2); console.log(timesTwo(4))... -
22 votesanswersviews
调试SystemJS模块加载?
我很难理解模块,需要一种方法来调试我的问题 . 有没有办法使用SystemJS枚举模块及其导出? 配置文件似乎是一个记录不完整的雷区 . 对于提供像'RxJs'这样的软件包的模块,如果我将软件包包含在脚本标记中,或者如果我尝试使用SystemJS配置加载它,我怎么能告诉我 should 能够在我加载的内容中找到什么以及在哪里它是在?例如,我可以通过将 node_modules/rxjs 复制到ww... -
3 votesanswersviews
使用SystemJS加载模块时如何摆脱“默认”属性?
我有一个AMD module,我想用SystemJS加载 . 我能够做到这一点,但不幸的是我必须这样称呼它: var Logdown = module.default; var instance = new Logdown('Test'); 我想跳过打电话 .default ,但我不知道如何摆脱这个属性 . 我认为这个 default 以某种方式由SystemJS加载器分配 . 这是我的模块: ... -
0 votesanswersviews
使用SystemJS加载捆绑的AMD模块
我有几个使用TypeScript的 --outFile 选项编译的AMD模块到一个文件中: define("partA", ["require", "exports"], function (require, exports) { "use strict"; function partAFunc() {... -
0 votesanswersviews
systemjs无法加载我的模块
systemjs.config.js: /** * System configuration for Angular samples * Adjust as necessary for your application needs. */ (function (global) { System.config({ paths: { // paths serve as a... -
0 votesanswersviews
当ES6模块由SystemJs加载异步时,如何处理Kendo MVC事件绑定
由于SystemJs加载模块异步,您无法直接将事件绑定到html文件中 . 即使在System.import之后声明控件,此时所有函数都是未定义的 . 例如,以下内容不起作用: <script type="text/javascript"> System.import('myModule'); //myModule contains a function cal...