trending_up Technology

What is the difference between a normal Angular application and Angular Universal?

A normal Angular application executes in the browser, rendering pages in the DOM in response to user actions. Angular Universal executes on the server, generating static application pages that later get bootstrapped on the client. This means that the application generally renders more quickly, giving users a chance to view the application layout before it becomes fully interactive.

I've been working with various technologies and frameworks for quite some time and I think Nest has made adding Angular Universal extremely simple.

Step 1: creates a new angular app named ng-appname

  • npx ng new ng-appname

Step 2: cd to the newly created app folder

  • cd ng-appname

Step 3: adds Angular Universal to the the existing app and adds configuration for Nest to server the Angular site (using Express).

  • ng add @nestjs/ng-universal

note: run npm i --save @nguniversal/common to include it into your package.json

Step 4: Build & Run your App

  • npm run build:ssr

  • npm run serve:ssr

 

That's it! Open a browser and navigate to the new server hosted Angular Universal application. (http://localhost:4000) *typical site location unless configuration changes have been made. Happy Coding..


Ver otras perspectivas

También puede disfrutar de estas ideas adicionales relacionadas

anastasia
TechnologyAzure Kubernetes Service (AKS)

With advancing technologies like serverless architecture, infrastructure goes on lower priority. The Azure offering for Kubernetes is the Azure Kubernetes Service (AKS) (formerly known as Azure Container Service).

anastasia
BlockchainMaximizing Cloud Security with Azure Security Center

Cyber attacks are on the rise as the threat landscape expands every day. Remote work on various devices outside of official networks have unknown security levels and poses higher security risks.

anastasia
TechnologyTime Series Database and Its Use Cases

Today’s digital space is crowded with various devices like smart homes, autonomous crypto currency /stock trading algorithms, energy sensor systems or sales forecasting applications among others.

Gracias por su interés.

Comparta nuestros conocimientos con su red