Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browserify + angular-fullpage.js #35

Open
tonestrike opened this issue Aug 14, 2018 · 2 comments
Open

Browserify + angular-fullpage.js #35

tonestrike opened this issue Aug 14, 2018 · 2 comments

Comments

@tonestrike
Copy link

tonestrike commented Aug 14, 2018

I have an application that relies on Browserify. I am trying to add this module to my application but am having trouble. This is what my Package.JSON looks like:

"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"
    }
}

I require the module in the AngularJS application using

require('angular-fullpage.js')

When I run the application I get:

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

Any ideas what is wrong with this?

@hellsan631
Copy link
Owner

I'm only currently exporting the module as an angular directory.

@tonestrike
Copy link
Author

tonestrike commented Aug 16, 2018

So is the answer that there isn't a way to do this using Browserify?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants