Questions tagged [angular-universal]

Angular Universal is a server-side rendering module for Angular applications.

angular-universal
Filter by
Sorted by
Tagged with
148 votes
12 answers
36k views

Implementing a plugin architecture / plugin system / pluggable framework in Angular 2, 4, 5, 6

Update 5/24/2018: We are now +3 versions of Angular from my original post and still don't have a final workable solution. Lars Meijdam (@LarsMeijdam) has come up with an interesting approach which is ...
Anthony Gatlin's user avatar
50 votes
6 answers
8k views

How to debug Angular universal?

I am using Angular Universal Starter repo. In angular 4 universal for ssr we could debug browser and node part of application in dev mode(see console), but now I do not see way to debug node part. I ...
dimson d's user avatar
  • 1,581
42 votes
9 answers
103k views

How do I import svg from file to a component in angular 5?

All tutorials with adding svg to a component in AngularCli that I found recommend to insert it in html template, something like this: <div> <svg viewBox="0 0 250 250"> <svg:g ...
mr_blond's user avatar
  • 1,646
39 votes
12 answers
112k views

Update to Angular v6 - Module not found: Error: Can't resolve 'fs'

I'm trying to migrate my Angular Universal project from Angular v5 to v6 I've got a service where I use fs to load the translation on the server side. Everything works well with Angular v5. With ...
David Dal Busco's user avatar
31 votes
1 answer
4k views

Angular Universal with i18n (Server Side Rendering)

I try to use Angular official internationalization tools with angular universal. So far I'm able to translate the client side rendering using the following procedure (thanks to this answer https://...
Stnaire's user avatar
  • 1,120
27 votes
5 answers
8k views

Angular-universal getting error: You must pass in a NgModule or NgModuleFactory to be bootstrapped

I converted my existing angular-cli application to angular-universal by following this guide. You can look at my complete source code here. I am able to build both browser and client projects but I ...
Saurabh Palatkar's user avatar
27 votes
1 answer
1k views

dotnet core + Angular Universal + docker => Prerendering failed because of error: Error: Cannot find module

We have a project developed using Dotnet core, Angular Universal. We use the prerender feature of Asp.net Core SPA services. In the local environment, the application works both on Windows, Linux. ...
Deniz İrgin's user avatar
21 votes
2 answers
32k views

DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), ... methods instead

I have an angular project and recently I have added angular-universal to it using the following command: ng add @nguniversal/express-engine --clientProject {{ name of your project }} building and ...
Khaled Jamal's user avatar
21 votes
1 answer
3k views

Server Side Rendering Angular 2 in ASP.NET with Edge.js

I'm exploring the possibility of rendering Angular 2 on the server side using Edge.js in an ASP.NET MVC application. I'm aware that the Angular Universal Starter Kit has part of this equation: https:/...
Nicholas Westby's user avatar
20 votes
1 answer
29k views

Angular isPlatformBrowser checking against PLATFORM_ID doesn't prevent server-side pre rendering

I am trying to compile Angular 4 + ASP.NET Universal application created based on sample project here, using this hints https://github.com/angular/universal#universal-gotchas and when I build project ...
Michał Ziobro's user avatar
18 votes
3 answers
3k views

How to upload pre-rendered file on S3 and access that on initial load of our webpage?

I have my web application implemented using Angular Universal Starter kit. I want to upload the pre-rendered file to the S3 bucket so that my initial page gets loaded faster.But I couldn't find the ...
Shailaja shah's user avatar
18 votes
1 answer
798 views

service worker and sw precache with angular universal

I used sw precache with service worker.I cached only browser folder in service worker.So that server side rendering not working in service worker.can anyone pls help me to solve this.if ssr working ...
kamalav's user avatar
  • 1,200
18 votes
4 answers
6k views

Angular 6 Server Side Errror: Module not found: Error: Can't resolve './dist/server/main.bundle'

I'm working on a project, updating it to Angular 6. After the update, I'm now getting this error when trying to run the server-side rendering build Module not found: Error: Can't resolve './dist/...
Jonathan Corrin's user avatar
18 votes
0 answers
7k views

Angular5 Server side rendering, external Api data service does not work in ssr

I have set up and used successfully Angular5 + SSR. It is still pretty nice. All components work well on SSR and Non-SSR. And there are some services which call external HTTP get APIs to get some ...
Jihoon Kwon's user avatar
16 votes
4 answers
5k views

Server side rendering using Angular4(Angular Universal) [closed]

I am working on an Angular4 webpack project to which I wanted to add AngularUniversal to make server side rendering possible.But most tutorials are using angular cli.I want to integrate Universal with ...
RemyaJ's user avatar
  • 5,426
16 votes
4 answers
11k views

Angular Universal: navigator is not defined

I followed official angular-cli tutorial to integrate angular-universal to my existing angular-cli app. I am able to do SSR for my angular-cli app. But when I try to integrate ngx-leaflet, I am ...
Saurabh Palatkar's user avatar
16 votes
4 answers
7k views

(Angular 6) Angular Universal - Not waiting on content API call

Cannot get SSR to work when using Angular Universal with pages that use dynamic content. All other pages work and the dynamic pages return with HTML but do not include the dynamic data. Method Called:...
Smokey Dawson's user avatar
16 votes
5 answers
12k views

Update meta tags in angular universal with external API call

I've spent more than 2 months but could not found a clear solution of how to proceed with angular universal. I've already spent about 6 months in implementing angular universal on a project for which ...
Black Mamba's user avatar
  • 14.4k
15 votes
3 answers
14k views

npm run build:ssr does not work in angular 8

I use angular 8 and server-side-rendering but i got error when i run npm run build:ssr As you can see, src is repeated twice home/app/front/**src/src**/main.server.ts I tried everything without ...
user9714967's user avatar
  • 1,704
15 votes
9 answers
19k views

Heroku deploy using ts-node

I am trying to deploy a sample of the Angular Universal Starter in Heroku. The task npm start fails because it does not recognize ts-node. Is there a way to make deployment on Heroku work using ts-...
Joao Garin's user avatar
15 votes
2 answers
9k views

Angular Universal and external apis

Having searched for angular universal for many days I see there is a lack of information of how actually ServerSideRendering works . Let me guide you through my concerns and help me clarify some blur ...
Dionisis K's user avatar
15 votes
1 answer
3k views

Unable to serve server rendered app due to Firebase's IDBIndex error

My environment Operating System version:Windows 10 Firebase SDK version: 6.0.2 Problem I followed this tutorial for creating server side rendered app. The error occurs when I try to serve the app ...
Kartik Watwani's user avatar
15 votes
1 answer
1k views

Angular (8) Universal with firebase cloud functions - can't match any routes

UPDATE: I created a new project with every angular update there was and now on 8.2.0 it seems to be working. Just follow the instructions below, BUT there's currently a bug within webpack. So, after ...
Gerrit Hillebrecht's user avatar
14 votes
5 answers
16k views

How to get full base URL (including server, port and protocol) in Angular Universal?

I need to get the full base URL (e.g. http://localhost:5000 or https://productionserver.com) of my Angular 2 app so that I can pass it along to a 3rd party service in the context of the app. The app's ...
Andrew Stegmaier's user avatar
14 votes
2 answers
8k views

How to remove Angular Universal on angular project

I enabled angular universal on my project . I would like to remove it completely now. I tried to remove the following files /server.ts /webpack.server.config.js /src/tsconfig.server.json /src/main....
user avatar
14 votes
2 answers
5k views

Angular Universal "Module file (/src/app/.ts) not found"

I have an app originally developed on Angular 2 that I have slowly migrated over time as new versions of Angular come out using Angular release documentations. Currently the version of the angular in ...
Nylon Smile's user avatar
  • 9,166
13 votes
5 answers
7k views

ERROR Error: Uncaught (in promise): TypeError: i.BehaviorSubject is not a constructor in Angular 10 SSR

I'm getting this issue after build successfully and run on browser with angular universal Here is my package json : { "name": "ssr", "version": "1.0.0", &...
Rahul Nakum's user avatar
13 votes
2 answers
10k views

Add static pre-rendering to ng add @nguniversal/express-engine

I added server side rendering to my Angular project by following the Angular documentation here. I found out that the commands to run the static pre-rendering npm run build:prerender and npm run ...
Johan Rin's user avatar
  • 1,940
13 votes
5 answers
8k views

Angular Universal (SSR) Error: Failed to lookup view "index" in views directory

I want to deploy my angular universal app on aws. From my understanding, I can only deploy my app on elastic beanstalk because it needs a web server to run. (It means no S3 deployment). When I ...
Johan Rin's user avatar
  • 1,940
13 votes
3 answers
2k views

Angular Universal - Pre-render only for web crawlers?

I am intending to user Angular Universal for server side rendering (SSR) but this should only be done for crawlers and bots from selected search engines. What I want is the following schema: ...
Stefan Falk's user avatar
  • 24.6k
12 votes
5 answers
8k views

"ReferenceError: WebSocket is not defined" when using RxJs WebSocketSubject and Angular Universal

I'm setting up an angular 6.x univeral project in order to leverage its SSR (Server-Side Rendering) capabilities. In my app, I'm using websocket communication using RxJs. More specifically, I'm, ...
Ronin's user avatar
  • 7,632
12 votes
2 answers
8k views

Using cookies in Universal Rendering using angular-cli

I have made an angular app using angular-cli and doing universal rendering in it by following steps given here . But it is mentioned that i can't use Global variables like window and document in my ...
Devesh Jadon's user avatar
  • 7,184
12 votes
1 answer
8k views

Angular universal rendering for some routes only

I was playing with angular universal a bit but cant find option to use server side rendering only for some pages like home page and render all other routes in standard angular way. I don't want to use ...
Andzej Maciusovic's user avatar
12 votes
2 answers
5k views

Server side rendering. Web API and Angular 2

I've developed a web application built using ASP.NET Core Web API and Angular 4. My module bundler is Web Pack 2. I would like to make my application crawlable or link sharable by Facebook, Twitter,...
StepUp's user avatar
  • 37.3k
12 votes
1 answer
3k views

Angular Universal server rendering WebSocket

Are there any examples of Angular Universal with WebSockets? Serverside rendering does not know wat a WebSocket object is in my case. And if I use socket.io the node server hangs when trying to make ...
Marco's user avatar
  • 281
12 votes
1 answer
4k views

Server side rendering doesn't wait for API calls to finish

Hi I am using Angular version 4.3 and I have implemented server side rendering as mentioned in this article. https://medium.com/@cyrilletuzi/angular-server-side-rendering-in-node-with-express-...
Aniket's user avatar
  • 5,118
12 votes
3 answers
12k views

Function calls are not supported in decorators while ng build --prod (AOT)

Type of Issue: Bug / Question Description I'm using ng-packagr lib to compile my library to js. I've compiled everything without any problems, but when I'll want to consume my library with ng build -...
Bloodcast69's user avatar
11 votes
2 answers
3k views

Angular Universal Firebase: no provider for InjectionToken MODULE_MAP

Why do I get Error: StaticInjectorError(AppServerModule)[NgModuleFactoryLoader -> InjectionToken MODULE_MAP]: StaticInjectorError(Platform: core)[NgModuleFactoryLoader -> InjectionToken ...
Phil's user avatar
  • 7,289
11 votes
5 answers
7k views

Server does not wait till http call completes before rendering - angular 4 server side rendering

I have gone ahead and implemented angular universal and able to render static part of html via server side rendering. Issue that I face is, API calls are being made and server is rendering the html ...
Chan15's user avatar
  • 979
11 votes
1 answer
5k views

How to make Angular Universal and PWA work together?

I have a SSR Angular app which I am trying to transform into a PWA. I want it to be server-side rendered for SEO and for the "fast first rendering" that it provides. The PWA mode works fine when ...
Guerric P's user avatar
  • 31.4k
11 votes
2 answers
6k views

Angular Universal for dynamic content?

I want to use Angular Universal for two things: SEO and preview of the site on social media. I know it is possible with static site content. But what about dynamic content? What if I want search ...
Phil's user avatar
  • 7,289
11 votes
2 answers
2k views

Angular 5 Universal wait for http request to return during server-side render

I have an Angular 5 app that is served using ngExpressEngine (Followed the Angular Universal starter project). My app has a component that makes a HTTP request to to get some data to be displayed. ...
Steve Fitzsimons's user avatar
11 votes
1 answer
1k views

Authentication in angular 2 universal, nodejs

I downloaded universal-starter for nodejs and started migrating my website from old angular-rc4. But when I have to implement authentication (in my case it's JWT which is stored in localStorage), the ...
user3027246's user avatar
11 votes
0 answers
469 views

Importing AngularJS 1.6 into Angular-Universal Project

We have a hybrid Angular6 and AngularJS 1.6 project which we are currently migrating. In this process, we also want to introduce Server Side Rendering (SSR). The problem is, that the SSR is running ...
helgetan's user avatar
  • 1,407
10 votes
2 answers
9k views

Angular 8 Universal Build Failed on SCSS Imports

I am using AngularCLI and an Angular v8. In regards to Angular Universal, I have encountered an issue where after I run these commands which are the preparatory steps to setup: ng generate universal -...
KShewengger's user avatar
  • 8,069
10 votes
7 answers
24k views

ng test fails in angular universal Error "Incomplete: No specs found, , randomized with seed 48751"

convert angular 7 project into angular universal while running "ng test" command giving error as "Incomplete: No specs found, , randomized with seed 48751". Tried different ways mention over ...
sunera pathan's user avatar
10 votes
3 answers
5k views

Angular Universal does not wait for api/http request before render

I have a brand new angular universal project that seems to pretender all the HTML (which is good). However, I am trying to make an API call to my .NET server which is a standard API build with the ...
Stanley's user avatar
  • 2,592
10 votes
3 answers
7k views

How to set up Angular cli + Angular universal?

Anyone have experience with installing angular universal with angular cli projects? I tried to follow this guide: https://universal.angular.io/quickstart/ But after I do this: typings install node ...
Vladimir Djukic's user avatar
10 votes
4 answers
14k views

An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID

When running ng deploy I get the following error: An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID See "C:\Users\theoh\AppData\Local\Temp\...
chadoulis's user avatar
  • 413
10 votes
4 answers
2k views

How to prevent css animation to reoccur when angular SSR bootstraps the app

I built a landing site using Angular. To make it SEO friendly, I had to do prerender it. The landing page starts with an intro animation (using CSS' animation). When I first load the page/full ...
Eliya Cohen's user avatar
  • 11.2k

1
2 3 4 5
36