Closed kaihaase-wd closed 6 years ago
Hello,
I have the same problem
Hey guys, So sorry for so much respond time. Unfortunately, for now, we're not compatible at all with Angular Universal. We'll do our best to achieve this.
Hey guys
Sorry for so much responding time. I've got a fix for this problem. Please head to: /free/navbars/navbar.component.ts and: In constructor change type of renderer from Renderer to Renderer2 then find a line:
this.navbar.nativeElement.append(child)
and change it to
this.renderer.appendChild(this.navbar.nativeElement, child);
And now it should work fine.
Let me know if there are more problems.
Best Regards,
Damian
@Bloodcast69 Thanks for your angular universal compatibility answer. you have just save me a lot of time :-).
@kvincent3 we're now compatible with Angular Universal. Feel free to try it! https://mdbootstrap.com/getting-started/angular-universal/ Best Regards, Damian
I'm using angular universal, and I followed this guid, but an error occured when I import MDBBootstrapModule.forRoot() to app.module.ts
ReferenceError: window is not defined
also in your guid you didn't mention how to correctly use mdb after installing angular universal @Bloodcast69
Dear @xxyyzz2050
Please follow our Universal Guide carefully, and it will work. You have to add those lines to your server file, and it should work fine.
global['window'] = win; global['Node'] = win.Node; global['navigator'] = win.navigator; global['Event'] = win.Event; global['Event']['prototype'] = win.Event.prototype; global['document'] = win.document;
Please follow carefully our Universal guide, because this guide was tested few times, and we're sure that it works fine.
LINK: https://mdbootstrap.com/docs/angular/getting-started/angular-universal/
Hello, MDB team,
thank you for "Angular Bootstrap with Material Design". We use the PRO version together with Angular Universal (Express Framework).
When delivering our app, the following error message is issued by the server:
ERROR TypeError: t.navbar.nativeElement.append is not a function
I suspect that the
nativeElement
ofnavbar
in the NavbarComponent in Angular Univer does not fully implement all functions.Is it possible to fix this or at least catch the error by checking whether the function exists before the call?