Topic: Server side rendering (universal) impossible. (KeyboardEvent/MouseEvent/window/Event)
Hosboss pro asked 7 years ago
Damian Gemza staff answered 6 years ago
carloscabanita pro answered 7 years ago
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: No
- Provided link: No
Lesther Caballero pro commented 7 years ago
I found a temporary solution. Go to the carousel folder=>carousel.components.ts, search for the word "KeyboardEvent" (line 428) which is an interface and replace it for "any"Hosboss pro commented 7 years ago
Thank you for your answer, but it only partially answers the problem (I already solved this by placing a replacement in the webpack config test: /.(ts|js)$/, loader: 'regexp-replace-loader', options: {match: {pattern: '\ [(Mouse | Keyboard) Event \]', flags: 'g'}, replaceWith: '[]',} But that does not solve window problems for example, I am forced to rewrite the components as for example for sidenav: // pobraneie szerokosci okna po init if (isPlatformBrowser (this.platformId)) { // Client only code. this.windwosWidth = window.innerWidth; } if (isPlatformServer (this.platformId)) { // Server only code. .... } But I can not do this for all the compenents that will take too much time and I would lose the benefits of having paid a license to avoid me just that. But thanks again.