Topic: navbar.nativeElement.append is not a function in Angular Univeral
Hosboss pro asked 6 years ago
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 6 years ago
Damian Gemza staff answered 6 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: Yes
- Provided link: Yes
Damian Gemza staff commented 6 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, DamianHosboss pro commented 6 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 6 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