Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular 6 Compatibility #356

Closed
mechevarria opened this issue May 18, 2018 · 4 comments
Closed

Angular 6 Compatibility #356

mechevarria opened this issue May 18, 2018 · 4 comments

Comments

@mechevarria
Copy link

I upgraded to Angular 6 and a few changes needed to be made to make everything work. A working example is patternfly-ng-seed

  • The rxjs-compat package needed to be added to get the Table component to work due to deprectated RxJS usage in ngx-datatables. The better fix is update the dependency for ngx-datatables to 12.0.0 . Other dependencies that needed updating for RxJS is ngx-bootstrap to 3.0.0. Having rxj-compat installed is a workaround but its better to remove that dependency.

  • ng2-dragula gave a runtime error that required adding (window as any).global = window; to polyfills.ts. That error is documented here

  • The angular.json format required changing the paths to styles and scripts from (example) "../node_modules/patternfly/dist/css/patternfly.min.css" to "node_modules/patternfly/dist/css/patternfly.min.css". Its just removing the "../"

@mechevarria
Copy link
Author

Just saw that these fixes are in the works

#355

@dlabrecq
Copy link
Member

dlabrecq commented May 21, 2018

Unfortunately, ngx-bootstrap 3.0.0 and ngx-datatable 13.0.0 are built with Angular 6. They had been building with Angular 4 which allowed it to be compatible with Angular 4 and 5. In fact, we changed ngx-datatable upstream to build with Angular 4 in order to be compatible with Angular 4 and 5.

In order to be compatible with all Angular versions, ngx-bootstrap, ngx-datatable, and patternfly-ng had been built with the lowest version possible (i.e., Angular 4), while the peer dependencies are defined for Angular as >=4.0.0 || >=5.0.0.

In order to use ngx-bootstrap 3.0.0 and ngx-datatables 13.0.0 we either need them to build with Angular 4. (Very unlikely to get two packages to change.) Or, bump the major release of patternfly-ng to use Angular 6 and drop support for Angular 4 and 5.

That leaves the angular-tree-component dependency, which is still built with Angular 4. It will probably be ok, but will need to test if patternfly-ng can still build that using Angular 6?

@mechevarria
Copy link
Author

Another upgrade issue to Angular 6 I found is with running angular-cli with the --prod option, ng serve --prod, the Vertical Navigation, Card and Table components get runtime errors like in the attached screenshot
screenshot from 2018-05-22 09-46-12

The prod does a minify and uglify and that seems to mess something up with the view update and change detections

@dlabrecq
Copy link
Member

Angular 6 support is available with v4.0.0 -- see #359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants