Topic: navbar.nativeElement.append is not a function in Angular Univeral
ERROR TypeError: l.navbar.nativeElement.append is not a function
It's the same problem as this :
https://github.com/mdbootstrap/Angular-Bootstrap-with-Material-Design/issues/58
Merci de votre aide ! Damian Gemza staff answered 7 years ago
this.navbar.nativeElement.append(child)and change it to
this.renderer.appendChild(this.navbar.nativeElement, child);And now it should works fine. Let me know if there's more problems. Best Regards, Damian
Damian Gemza staff answered 7 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: Yes
Damian Gemza staff commented 7 years ago
Dear Turki, could you provide me some reproduction steps? We're not fully compatible with Angular Universal, we have this in our plans to the nearest future. Best Regards, DamianTURKI Hosni pro commented 7 years ago
Hi Damian, I followed the steps of this tutorial: https://medium.com/@evertonrobertoauler/angular-5-universal-with-transfer-state-using-angular-cli-19fe1e1d352c and I get the error message when I run the command node dist/server.js It's very important, even essential, for me I can not use it for my site if SEO is not possible. Thanks, Best RegardsDamian Gemza staff commented 7 years ago
Turki, I've downloaded repo from this tutorial, added MDB to it and pasted sample code from navbar. Then ran this out, and I see no errors there. Could you send me your project without node_modules at d.gemza@mdbootstrap.com ? Best Regards, Damian