12

I am trying to use ngx-chips for tag-input, but I am having this issue with importing BrowserAnimationsModule.

On importing BrowserAnimationsModule, I get the error below:

An unhandled exception occurred while processing the request.

NodeInvocationException: document is not defined
ReferenceError: document is not defined

Once I comment BrowserAnimationsModule in import under app.module.shared.ts, my app works normal but once I uncomment it, I come up with the same error.

Please how can I trash this, I have been working on this for more than 4days. Or suggest any other angular 4 tag-input library I am using ASP.NET Core 2 SPA Template.

Thanks...

1 Answer 1

18

In your view's (Index.cshtml) app tag, replace the asp-prerender-module with asp-ng2-prerender-module.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, this fixed it for me with ASP.NET Core 2 and SPA template.
Is the asp-ng2-prerender-module a new keyword or your "solution" simply disable SSR?
If your components (Kendo UI in my case) are looking for 'window', then they are not compatible with SSR. No 'window' or any other DOM elements on the server, right? My 'solution' therefore was to get past this stumbling block and move on . . . to the next stumbling block.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.