Git Product home page Git Product logo

Comments (1)

swaechter avatar swaechter commented on August 19, 2024

Hey Daniel

Sorry for my late reply. Sadly no, all general limitations of Angular Universal apply because AngularJ Universal is using them under the hood:

  • Never ever access the raw DOM like setting styles, installing listeners etc. Angular itself abstracts these manipulations and provides the Renderer class https://angular.io/api/core/Renderer that provides a wrapper API and is also respected by server side rendering. The problem is, that third party libraries like jQuery/Other DOM libraries don't rely on this class --> Check if you are running on the server or client side via isBrowser/isNode
  • No access to local storage

Of course you can replay the events via the Renderer and some custom code, but never access them before hand. Let's say a user has logged in to a website and stores his JWT access token in local storage (Which you shouldn't by the way), you will never be able to access this token on the server so easily (Of course with a lot of hacked JavaScript...but that won't work for all use cases).

You can find a pretty good article here. More or less all problems also apply for the Java abstraction: https://malcoded.com/posts/server-rendering-pitfalls

from angularj-universal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.