Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 18 2018 18:38
  • Feb 23 2018 19:09
    Travis angular/universal (github) errored (932)
  • Feb 20 2018 23:13
    Travis angular/universal (master) passed (915)
  • Feb 20 2018 07:26
    Travis angular/universal#810 passed (914)
  • Feb 20 2018 07:26
    Travis angular/universal (document-url-option) passed (913)
  • Feb 17 2018 15:28
    Travis angular/universal (master) passed (912)
  • Feb 17 2018 02:46
    Travis angular/universal@43190ce (github) passed (910)
  • Feb 17 2018 02:36
    Travis angular/universal#898 passed (909)
  • Feb 17 2018 02:32
    Travis angular/universal#898 passed (908)
  • Feb 17 2018 02:31
    Travis angular/universal#898 passed (907)
  • Feb 17 2018 02:13
    Travis angular/universal#898 passed (906)
  • Feb 17 2018 01:57
    Travis angular/universal#898 broken (905)
  • Feb 17 2018 01:53
    Travis angular/universal#898 passed (904)
  • Feb 16 2018 22:28
    Travis angular/universal#897 passed (903)
  • Feb 16 2018 22:27
    Travis angular/universal@e0c49ff (url) passed (902)
  • Feb 16 2018 18:06
    Travis angular/universal#894 passed (901)
  • Feb 16 2018 09:17
    Travis angular/universal#895 passed (900)
  • Feb 16 2018 09:12
    Travis angular/universal#895 broken (899)
  • Feb 16 2018 09:05
    Travis angular/universal#895 broken (898)
  • Feb 16 2018 09:00
    Travis angular/universal#895 broken (893)
route /product/:id
How to implement socket in angular universal?
Niraj Shukla
Hi, coders..!!
i have created an angular universal app, its running fine on my local machine..
now i am trying to deploy it on digital ocean, nginx server
but there is a issue, which i am facing i.e when i visit the link, its showing me gateaway error. and i am not able to understand why this error is generated
even when pm2 is showing my app status as runningf..
if anyone has faced similar issue and was able to solve it..plz let me know
Niraj Shukla
thanks for paying attention and helping me out..!!
@shuklaniraj what is your backend , java .net core....?
Niraj Shukla
@Ilyoskhuja backend is ROR and its running on different server
Michael Doyle

Hi all! I've recently implemented Angular Universal on a single-page app, and I'm finding that the TTFB for the server-side rendering is getting as high as 8 seconds (depending on the device or connection involved). At the moment there isn't a cache set up, but is there a way I can determine how much of the TTFB would be resolved by caching, and how much is due to the actual time it takes to render the server-side content? (If it helps, the application is built on an Azure App Service)

Also, is it true that Observables cause the server-side rendering to slow down? My app has a lot of them dotted around, and if I don't need to, I'd like to avoid having to create platform-specific code branches to prevent them all from being fired (as the Universal gotchas file alludes to). Thanks!

Hi all , i have recently implement Angular Universal on single-page app and i am seeing this error Error: Cannot match any routes. URL Segment: 'null' on running npm run serve:ssr. Can Anyone please sussegt some solution this problem.
Abdul Basit Khan
how to upload image ion gitter ??
Abdul Basit Khan
need help!! when deploying my website on c penal server. I am getting this error every thing is working fine in my local but when deploying on server its give error like this. please help me I am stuck
core.js:5967 ERROR HttpErrorResponse {headers: HttpHeaders, status: 200, statusText: "OK", url: "http://guestpostio.com/api/dashboard/category/getpost", ok: false, …}error: {error: SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHtt…, text: "<!doctype html>
↵<html lang="en">
↵    <me…src="main.js" defer></script></body>
↵"}headers: HttpHeaders {normalizedNames: Map(0), lazyUpdate: null, lazyInit: ƒ}message: "Http failure during parsing for http://guestpostio.com/api/dashboard/category/getpost"name: "HttpErrorResponse"ok: falsestatus: 200statusText: "OK"url: "http://guestpostio.com/api/dashboard/category/getpost"__proto__: HttpResponseBase
Hi .

!function(e,t){ true?t(exports,webpack_require(/! @angular/core / "./node_modules/@angular/core/fesm2015/core.js"),webpack_require(/! @angular/common / "./node_modules/@angular/common/fesm2015/common.js"),webpack_require(/! @angular/animations / "./node_modules/@angular/animations/fesm2015/animations.js"),webpack_require(/! @angular/forms / "./node_modules/@angular/forms/fesm2015/forms.js")):undefined}(this,function(e,t,n,i,r){"use strict";var o=function(e,t){return(o=Object.setPrototypeOf||{proto:[]}instanceof Array&&function(e,t){e.proto=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};function s(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function a(e){return"function"==typeof e}var c=!1,l={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;t.stack}c=e},get use

ReferenceError: Event is not defined
at /home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:305394:207150
at /home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:305394:207331
at ./node_modules/ng-pick-datetime/picker.bundle.js (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:305394:22)
at Object../node_modules/ng-pick-datetime/picker.bundle.js (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:305394:430)
at webpack_require (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:20:30)
at Object../src/app/core/core.module.ts (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:353343:28)
at webpack_require (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:20:30)
at Object../src/app/app.server.module.ngfactory.js (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:351956:13)
at webpack_require (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:20:30)
at Object../server.ts (/home/ubuntudev/workspace/dev/repos/client/btxclient/dist/btxclient/server/main.js:351526:29)

A server error has occurred.
node exited with 1 code.



Is there anyone who has experience with universal i18n? Can't find a solution to build bundles correctly. Using Angular 11.

Currently, trying to reach the goal that the app routing will work that way:

As I see It, there should be 2 folders inside the dist —> /ru and /en (done)
But can't get what should be inside the dist-server folder

Should there be one main.js that will redirect to /ru /en? of should there be two folders with separate server files, so that you launch 2 servers?

Will appreciate any help. And even ready to have a paid consultation

The documentations are hardly helping (


I've found the answer in this artickle but now I have another one:

Also can anyone tell if there is a strategy for this kind of situation?

I have user pages which are used for SEO. They get cached while the first ssr loading happens. But later the user can change any data and I can't find out how to behave in this situation

For example, the user is Joe. The page gets cached and I use TransferState to save the user object so i don't have to make another server request.

Later the user changes his name to David and the only way I see here is to check the whole object field by field and switch only the fields that have been changed and put them into the transferstate, but that seams not right

Have anyone faced this kind of issue?

@Bodeclas Hoy presente el mismo problema y se debio a que estaba inportando el HttpClientModule desde varios modulos de características, los elimine de cada uno de esos modulos y solmamente lo deje en app.module, se que sucedio hace casi 3 años, pero tengo la intriga de que fue lo que te sucedio a ti, ya que comentas que tambien lo tenias importado solo en app.module, cual fue tu error? Saludos!
@letsinvade Hi, I struggled a lot with i18n, it worked perfect, but I find it disappointing to have to reload the entire app to change the language and also create several servers for each language, I opted for ngx translate + ngx extract translate, it is working excellent for me, you can configure like this: ru.page.com en.page.com en.page.com via subdomains, although I have made it work without the subdomain only by checking the browser's language accept header, in the end it is in production and works well with cache of the On the ssr side, ngx extract is a great help, it saves you a lot of time, sometimes I don't even like to use third-party libraries but the official ones, but in this case I think the way to go for a good i18n is ngx translate!
@shuklaniraj Please check your access logs and error logs in your nginx server, you will able to know the error.
Vasko Vasilev
Hello everybody, has anyone had the issue where thay cannot fetch the AppServerModule file from their dist folder resulting in a TypeError: Cannot read property 'bootstrap' of null.
Yassine Gabsi
Good morning, has anyone encountered this problem? I tested everything, even the workaround posted on the internet ( related to domino )
 "dependencies": {
    "@angular/animations": "^11.2.10",
    "@angular/cdk": "^11.0.0",
    "@angular/cli": "~11.2.9",
    "@angular/common": "~11.2.10",
    "@angular/compiler": "~11.2.10",
    "@angular/compiler-cli": "~11.2.10",
    "@angular/core": "~11.2.10",
    "@angular/forms": "~11.2.10",
    "@angular/platform-browser": "~11.2.10",
    "@angular/platform-browser-dynamic": "~11.2.10",
    "@angular/platform-server": "~11.2.10",
    "@angular/router": "~11.2.10",
    "@auth0/angular-jwt": "^3.0.1",
    "@fortawesome/angular-fontawesome": "^0.7.0",
    "@fortawesome/fontawesome-svg-core": "^1.2.35",
    "@fortawesome/free-brands-svg-icons": "^5.15.3",
    "@fortawesome/free-solid-svg-icons": "^5.15.3",
    "@fullcalendar/angular": "^5.6.0",
    "@fullcalendar/daygrid": "^5.6.0",
    "@nguniversal/express-engine": "^11.2.1",
    "@sweetalert2/ngx-sweetalert2": "^6.0.1",
    "@types/jquery": "^3.5.5",
    "aos": "^2.3.4",
    "dotenv": "^5.0.0",
    "express": "^4.17.1",
    "jquery": "^3.6.0",
    "ngx-clipboard": "^14.0.1",
    "ngx-lightbox": "^2.2.2",
    "ngx-openlayers": "^0.8.22",
    "rxjs": "~6.6.7",
    "rxjs-compat": "^6.6.7",
    "sweetalert2": "^8.19.0",
    "tslib": "^1.14.1",
    "zone.js": "~0.10.3"
  "engines": {
    "node": "12.14.1",
    "yarn": "1.21.1"
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.1102.9",
    "@angular/language-service": "~11.2.10",
    "@nguniversal/builders": "^11.2.1",
    "@types/express": "^4.17.0",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "^8.10.66",
    "codelyzer": "^5.2.2",
    "jasmine-core": "~3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~6.3.2",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.5.4",
    "ngx-openlayers": "^0.8.22",
    "protractor": "^7.0.0",
    "ts-node": "~7.0.0",
    "tslint": "~6.1.3",
    "typescript": "~4.0.7"
those are my dependencies
Bruno Bruzzano
Hi there - I'm new to Angular Universal. I'm facing a simple issue when using mixpanel.js (https://developer.mixpanel.com/docs/javascript-quickstart#installation-option-2-html). I have added that snippet in the link here into my index.html.
Then into a service (let's say mixpanel.service), I'm trying to access to the mixpanel object but I'm getting an undefined value. In the service, I have injected the document as @Inject(DOCUMENT) document: Document and trying to get a reference to the mixpanel object with this.document.defaultView['mixpanel']. However, this doesn't work - could anybody give me an hint what I'm doing wrong?
Wilson Yeo

I deployed my angular build with SSR to the server Currently getting problem when I reload pages except for my homepage I am getting few seconds of 404 page while the page loading.

I understand if we deploy SPA we need to fallback to index.html I am using Nginx which mean when I haven't use SSR we are doing

try_files $uri $uri/ /index.html;

but currently, we deployed universal / SSR build we get this error and we don't know what to fix. since we are proxy the Nginx to localhost:4000 for the server now and we didn't want to use hash in route

so I wish to ask is there any way to solve or make the fallback to index.html? adding Nginx configuration? or can it solve in server.ts / express? any suggestions or solutions?

@jeffwhelpley @gdi2290

Wilson Yeo
is there anybody can help me or give me some directions?
David Calvo Meier
Hi Guys! Someone have a guide to use prerender in angular 12?
I always have the same message error "Cannot read property 'headers' of null
David Calvo Meier
ok, now i know why... but the problem know is that i don't have REQUEST token on server side service... but I Injected...
Hi guys
Need help with this issue - angular/universal#2172 - been stuck on its for 2days
5 replies
David Calvo Meier
I don't know if this is help, but in mi upgrade from 8 to 12... i had to delete universal first and when i was in 12 install it
when I tried to updated I always had problems
thanks @DavidCMeier let me give it a try
btw when you say you had to delete universal, what all things should i delete
Mathieu Maes
Is there anyone here who can invite me in the Universal Slack account ? https://angular-universal.slack.com/
Hi Guys, have been searching for any content on how angular universal works, but couldn't find much, can anyone point me in the right direction
Dirk Van Haerenborgh
Hi! I'm brand new to angular universal and I was wondering if there's a way to force rendering for some module to be fully server-side

how the heck is this valid to return void private ensurePageModelSubject() : void{

this.apiConfigService.operatorPageModelChanges$.subscribe((data) => {
  console.log('appliance api service has operator page model');
  try {
  } catch (err) {
    console.log('error starting ApplianceApiSvc');

  return (this.operatorPageModel = data);


Hello, is anyone using Domino on their Universal project and does it work well?
Hello, I don't use location.hrefin angular universal, Can you help me?
Ahmed Rebai
Hello guys why it's used syntax like that "constructor(private readonly http: HttpClient) {}"
what` the purpose of using read-only while injecting service ?
Anshul Sharma
abi amarulloh
Hi guys, anyone can help ?
Error: You must pass in a NgModule or NgModuleFactory to be bootstrapped
Hi i am working on Angular Universal, now after installing the package ng add @nguniversal/express-engine i got message cannot read property 'some' of undefined