ng-ui-kit-pro (Angular version) compile problem


Topic: ng-ui-kit-pro (Angular version) compile problem

rhaouari asked 5 years ago

Hi , i bought the Super Bundle : MDB Pro + All Plugins + Admin Dashboard when running the ng-uikit-pro-standard. project with ng serve command, i got this error :

ERROR in ./node_modules/ng-uikit-pro-standard/fesm5/ng-uikit-pro-standard.js 14187:63-71 "export 'DOCUMENT' was not found in '@angular/platform-browser'

here is my environment :

Angular CLI: 8.0.4 Node: 10.15.0 OS: darwin x64

Thanks for your help. RH.


Hi Rhaouari,

MDB Pro is currently made for Angular 7 - there are a few braking changes when migrating from 7 to 8, which you'll have to make manually.

I faced the same problem yesterday for a new project. For now I work directly with the MDB sources and have applied some hot fixes manually to keep working until the MDB folks deliver an updated version for Angular 8.

If I haven't missed anything, then it's basically just two fixes:

Changing the imports to the new location of DOCUMENT using:

import {DOCUMENT} from '@angular/common';

Then you'll have to add the missing second parameter to all ViewChild decorators. Basically that means adding ", {static: false}" or ", {static: true}" it's mostly false, but some need the true to work properly - a bit of trial and error.

Cheers, Kai


Damian Gemza staff answered 5 years ago

@backyardKiwi has right.

MDB Angular works fine with Angular 7. We are preparing the compatibility with Angular 8, and the MDB 8 (compatible with Angular 8) will be released on 8th of July.

Best Regards,

Damian


Please insert min. 20 characters.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.4
  • Device: PC
  • Browser: Chrome
  • OS: OSX
  • Provided sample code: No
  • Provided link: No