简体   繁体   English

使用带有 angular 4 的 Hello.js

[英]Using Hello.js with angular 4

I just want to use hello.js with angular 4 with specific server (private url).我只想将 hello.js 与 angular 4 与特定服务器(私有 url)一起使用。

Is-there angular module to do that ?是否有角度模块可以做到这一点?

I have try to use ngx-hellojs but there is an error on chrome :我尝试使用 ngx-hellojs 但在 chrome 上出现错误:

hello.all.js:1 Uncaught Error: only one instance of babel-polyfill is allowed
    at Object.eval (hello.all.js:1)
    at Object.1.2 (hello.all.js:1)
    at o (hello.all.js:1)
    at eval (hello.all.js:1)
    at Object.347.1 (hello.all.js:1)
    at o (hello.all.js:1)
    at t (hello.all.js:1)
    at eval (hello.all.js:1)
    at eval (hello.all.js:1)
    at Object.eval (hello.all.js:1)

Thanks for your help.谢谢你的帮助。 :) :)

Use ngx-hellojs使用 ngx-hellojs

Install using npm install ngx-hellojs使用npm install ngx-hellojs 安装

Edit .angular-cli.json编辑 .angular-cli.json

{
  //...
  "apps": [
    {
      //...
      "scripts": [
        //...
        "../node_modules/hellojs/dist/hello.all.js"
      ],
      //...
    }
  ],
  //...
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM