Ngx-admin: Angular 4?

Created on 27 Mar 2017  路  4Comments  路  Source: akveo/ngx-admin

  • I'm submitting a ...
    [ x] question about the decisions made in the repository

Does it ready for Angular 4?

question

Most helpful comment

Step-by-Step :

Update dependencies :

npm install @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest --save

Update devdependencies :

npm install @types/lodash@latest @angular/compiler-cli@latest typescript@latest --save-dev

Add vendor into 'config/webpack.dev.js :

bundles : { vendor : [ ... '@angular/animations', ... ]}

All 4 comments

I tested on Angular v4 and all of the components transfer.

Edit: I was receiving lots of errors, but when I tested with a clean version/fresh install there were absolutely no problems.

Step-by-Step :

Update dependencies :

npm install @angular/common@latest @angular/compiler@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest --save

Update devdependencies :

npm install @types/lodash@latest @angular/compiler-cli@latest typescript@latest --save-dev

Add vendor into 'config/webpack.dev.js :

bundles : { vendor : [ ... '@angular/animations', ... ]}

Adding to @alandrieu-gimel's instruction:

  • npm install core-js@latest rxjs@latest zone.js@latest --save (update angular dependencies)
  • npm install ng2-smart-table --save (v. 1.0 migrated to Angular 4, resolves build:electron issues)
  • npm uninstall ng2-bootstrap --save, npm install ngx-bootstrap --save and replace ng2-bootstrap with ngx-bootstrap everywhere in the code (the package for Angular 4 has been renamed)

Nevertheless the electron app is being built, but doesn't work after the launch.

Also commenting out the following lines resolved some issues for me (for example with ng2-validation):

module.exports = function (options) {
  return {
      // ...
    plugins: [
      // ...
      // Fix Angular 2
      //   new NormalModuleReplacementPlugin(
      //     /facade(\\|\/)async/,
      //     helpers.root('node_modules/@angular/core/src/facade/async.js')
      //   ),
      //   new NormalModuleReplacementPlugin(
      //     /facade(\\|\/)collection/,
      //     helpers.root('node_modules/@angular/core/src/facade/collection.js')
      //   ),
      //   new NormalModuleReplacementPlugin(
      //     /facade(\\|\/)errors/,
      //     helpers.root('node_modules/@angular/core/src/facade/errors.js')
      //   ),
      //   new NormalModuleReplacementPlugin(
      //     /facade(\\|\/)lang/,
      //     helpers.root('node_modules/@angular/core/src/facade/lang.js')
      //   ),
      //   new NormalModuleReplacementPlugin(
      //     /facade(\\|\/)math/,
      //     helpers.root('node_modules/@angular/core/src/facade/math.js')
      //   )
      // ...
    ]
  }
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

Kalaijagdai picture Kalaijagdai  路  4Comments

dreamerleolioa picture dreamerleolioa  路  4Comments

myurAgarwal picture myurAgarwal  路  3Comments

nsankaranarayanan picture nsankaranarayanan  路  3Comments

tal-shahar picture tal-shahar  路  3Comments