angularjs - 在angularjs中导入 Node 模块

标签 angularjs node.js import npm node-modules

如何导入模块,例如来自另一个的 pikaday,例如来自node_modules的angularjs中的handsontable

import {pikaday} from handsontable

似乎不起作用。

最佳答案

  1. 如果您使用 angular1,那么您还应该将它们添加为依赖项:

angular.module('YourApp', ['ngHandsontable','pikaday']);

  • 如果您使用 angular2,那么它应该是这样的:
  • 从 'picaday' 导入 { Pikaday },您可以 Read more这里

    关于angularjs - 在angularjs中导入 Node 模块,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43137592/

    相关文章:

    javascript - 带有括号的 AngularJS 模板

    node.js - Elastic Beanstalk for NodeJS 上的 SELF_SIGNED_CERT_IN_CHAIN 错误

    javascript - 如何通过nodejs中的nodemailer npm在不使用电子邮件凭据的情况下发送邮件?

    objective-c - 从 Swift 访问 Objective-C 变量/函数

    java - ClassNotFoundException Sandwich.Java...它在哪里?

    javascript - 如何使用div Angularjs的id将图像添加到md-dialog

    node.js - Angular.js 可以在脚本标签中的 Jade 模板中进行插值吗?

    javascript - 使用 Django 和 Angular 的 CORS 预检请求

    node.js - npm 链接 "The file is marked as an executable but could not be run by the operating system."

    django - 如何解决涉及 haystack 的循环导入?