Topic: Angular Universal router-outlet content

Sean Strycker free asked 5 years ago


I have followed the guide here: https://mdbootstrap.com/docs/angular/getting-started/angular-universal/

This is my app.component.html file:

<app-navtop></app-navtop>
<router-outlet></router-outlet>
<app-footer></app-footer>

I am able to see the navbar and footer in the SSR output but none of the content from the router-outlet.

Please let me know if there is anything else i need to do to be able to see the content from router-outlet... Thank you!


Damian Gemza staff answered 5 years ago


Dear Sean,

Did you send the reproduction repository to Arek? We can't debug your problem from only the code of the routing module.

I have checked the Google for your case - could you please take a look at those links?

https://stackoverflow.com/questions/48923227/angular-universal-not-rendering-route

https://github.com/angular/universal/issues/902

https://github.com/angular/universal-starter/issues/468

Best Regards,

Damian


Sean Strycker free commented 5 years ago

Hi Damian, yes I did email Arek.


Arkadiusz Idzikowski staff commented 5 years ago

Dear Sean,

I checked my inbox, but I didn't see any email from you. Can you try to send it again?


Sean Strycker free commented 5 years ago

Hi Arek, the email I sent to is: a.idzikowski@mdbootstrap.com I sent is as a zip file, so it might have gone to your spam?


Arkadiusz Idzikowski staff commented 5 years ago

I double checked my inbox and spam folder, but I still don't see any emails from you. Please try to send it again to a.idzikowski@mdbootstrap.com and d.gemza@mdbootstrap.com.


Sean Strycker free commented 5 years ago

Ok sorry about that, I sent a download link this time.


Arkadiusz Idzikowski staff commented 5 years ago

We tried to reproduce this problem on your app, but every route is loaded correctly. However, we needed to remove some elements from app.module and components templates because they were not available in the app files. We can not be sure that these elements do not cause any problems.

Did you run 'npm run build:ssr' and 'npm run serve:ssr'? Are there any errors in the console?

Please try the solutions from the sources provided by Damian.


Arkadiusz Idzikowski staff answered 5 years ago


Dear Sean,

Its hard to tell where is the problem without seeing some code. Please show your routing configuration or send a simple demo to a.idzikowski@mdbootstrap.com so we can debug this problem on our end.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.3.0
  • Device: Desktop
  • Browser: Chrome
  • OS: OSX
  • Provided sample code: No
  • Provided link: Yes
Tags