小编Kev*_*lla的帖子

角度2和SignalR

我在网络上搜索与Angular2测试版一起使用的SignalR的一些例子?因为我似乎无法找到使用测试版的示例.

我有一个主要问题是如何在Angular 2的beta版本上手动运行更改检测?

提前致谢

signalr angular

7
推荐指数
1
解决办法
2万
查看次数

将 Node 模块导入 Angular 2

我正在尝试将节点模块导入 Angular 2 但无济于事。

如何才能实现这一目标?

我正在尝试将以下模块导入 Angular 2: https://www.npmjs.com/package/countryjs

我是否需要使用 system.js 将其注册到当前应用程序中:

<!-- 2. Configure SystemJS -->
    <script>
      System.config({
        packages: {
          app: {
            format: 'register',
            defaultExtension: 'js'
          },
          map: {
              'countryjs': 'node_modules/countryjs/lib/countryjs'
          },
          meta: {
              // sets meta for modules within the package
              'vendor/*': {
                  'format': 'global'
              }
          }
        }
      });
      System.import('app/boot')
            .then(null, console.error.bind(console));


    </script>
Run Code Online (Sandbox Code Playgroud)

然后在 ts 文件中,我使用:

import {} from "countryjs"
Run Code Online (Sandbox Code Playgroud)

当我使用这个(如下)时,它给了我一个错误

import {Country} from "countryjs"
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?

node-modules systemjs angular

5
推荐指数
1
解决办法
6151
查看次数

标签 统计

angular ×2

node-modules ×1

signalr ×1

systemjs ×1