【发布时间】:2018-08-14 22:54:20
【问题描述】:
我有一个依赖 Browserify 的应用程序。我正在尝试将 angular-fullpage.js 模块添加到我的应用程序中,但遇到了问题。这就是我的 Package.JSON 的样子:
"browser": {
"fullpage": "./node_modules/fullpage.js/dist/fullpage.min.js",
"angular-fullpage.js": "./node_modules/angular-fullpage.js/angular-fullpage.min.js"
},
"browserify-shim": {
"fullpage.js": {
"exports": "fullpage",
"depends": "jquery"
},
"angular-fullpage.js": {
"exports": "angular.module('fullPage.js').name",
"depends": "fullpage.js"
}
}
我需要在 AngularJS 应用程序中使用该模块
require('angular-fullpage.js')
当我运行应用程序时,我得到:
Failed to instantiate module portal due to:
Error: [$injector:modulerr] Failed to instantiate module {} due to:
Error: [ng:areq] Argument 'module' is not a function, got Object
有什么想法吗?
【问题讨论】:
标签: angularjs browserify fullpage.js