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

Does not work with angular universal #174

Open
aharris opened this issue Jun 5, 2017 · 1 comment
Open

Does not work with angular universal #174

aharris opened this issue Jun 5, 2017 · 1 comment

Comments

@aharris
Copy link

aharris commented Jun 5, 2017

Works fine running client side but not with Universal.

/node_modules/ngx-scrollspy/dist/index.js:1 (function (exports, require, module, __filename, __dirname) { import { NgModule, Inject, Optional, OpaqueToken, SkipSelf } from '@angular/core'; ^^^^^^ SyntaxError: Unexpected token import at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:542:28) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3) at Module.require (module.js:497:17) at require (internal/module.js:20:19) at Object.<anonymous> (/Users/aharris/Projects/PNC/portal/src/app/app.module.ts:15:1) at Module._compile (module.js:570:32)

Any help with this much appreciated.

@kylecordes
Copy link

I have published a fork which works with Universal.

https://www.npmjs.com/package/@oasisdigital/ngx-scrollspy

However, I am not confident that it contains the right way to implement universal compatibility. Therefore, no PR yet.

If a Angular Universal guru comes along and would like to inspect what I did and suggest whether it is the right solution, here is the relevant commit:

OasisDigital@a9d6c93

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