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

Angular 17 demo "fullpage is not defined" #138

Open
AdamNormanJenkins opened this issue Mar 30, 2024 · 1 comment
Open

Angular 17 demo "fullpage is not defined" #138

AdamNormanJenkins opened this issue Mar 30, 2024 · 1 comment

Comments

@AdamNormanJenkins
Copy link

Hey everyone,

I just licensed this to try out, but the first small demo app failed

main.ts:6 ERROR ReferenceError: fullpage is not defined
at FullpageDirective.initFullpage (fullpage-angular-fullpage.mjs:26:33)
at FullpageDirective.ngAfterViewInit (fullpage-angular-fullpage.mjs:19:18)
at callHookInternal (core.mjs:5136:14)
at callHook (core.mjs:5163:13)
at callHooks (core.mjs:5118:17)
at executeInitAndCheckHooks (core.mjs:5068:9)
at refreshView (core.mjs:12817:21)
at detectChangesInView$1 (core.mjs:12970:9)
at detectChangesInViewIfAttached (core.mjs:12933:5)
at detectChangesInComponent (core.mjs:12922:5)

I'm literally just trying to run the code from demo/examples/basic

it seems like it's the console.log that's blowing up, maybe fullpage variable is not being initialised?

initFullpage() {
    console.log("fullpage", fullpage);
    this.fullpageApi = new fullpage('#' + this.id, this.options);
    this.addBuildFunction();
    this.ref.emit(this.fullpageApi);
}
@AdamNormanJenkins
Copy link
Author

fixed - will add here for anyone else that makes this bonehead mistake :)

gotta add the styles and script to angular.json

"styles": [
"src/styles.scss",
"./node_modules/fullpage.js/dist/fullpage.css"
],
"scripts": [
"./node_modules/fullpage.js/dist/fullpage.js"
]

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

1 participant