Ngx-admin: Do you plan move project to angular-cli ?

Created on 10 Dec 2016  Â·  46Comments  Â·  Source: akveo/ngx-admin

  • I'm submitting a ...
    [ ] bug report
    [ ] feature request
    [*] question about the decisions made in the repository

Do you plan move your project to angular-cli ?

enhancement

Most helpful comment

Hey Guys, fortunately, we have some news, right now we are in a process of defining new requirements for a second ng2-admin version based on angular-cli and lots of other great things.
If you have any feature requests or proposals we'd be glad to hear them.

All 46 comments

yeah they will.

whether it closer or further plans ?
Are you working on this now ?

I would really like to know as I am starting the process of moving my app from the current NG2-admin pack to an angular-cli based project. If you are going to switch over, I will wait and convert after you do as I like the pack. Otherwise, I'm going to continue my conversion.

If you are going to convert, do you have a projected time table?

Thanks in advance.

Any update on this would really help!

Are there any news?

any news?

any news?

any news?

any news?

Hey Guys, fortunately, we have some news, right now we are in a process of defining new requirements for a second ng2-admin version based on angular-cli and lots of other great things.
If you have any feature requests or proposals we'd be glad to hear them.

I would like to say thank you for working on this. While I have already converted my current project to Angular-CLI, I'm sure there will be future projects in which I would use your Angular-CLI version since your theme and UI are so nice.

If I could make one component suggestion, it would be to replace smart tables with AG-Grid. Smart tables have such little scaleability compared to Ag-Grid, and the speed, functionality, and ease of customization of Ag-Grid would make an excellent addition to your arsenal.

In the same way, if I can make one architectural suggestion, it would be to implement a more Angular 2 friendly file structure; including a shared module for reusable components, or "widgets", and a proper DI service pattern for HTTP requests within the components/directives.

I know it seems like I'm asking you to do alot of the work for the people who would be using your library, and I am in a way, but I believe that's the intended purpose of your project. If not, then never mind; but if so, then I believe these additions would take it to the next level.

Thanks again!!!

Hey @Difinity, many thanks for your suggestions! In a way, this is exactly what we are considering to achieve, so hopefully the new version will be even more useful and powerful.

Waiting for Angular-CLI version. when you will release? date?

@Difinity can you share your angular-cli version of this project?

@nnixaa Would it be alright with you guys if I shared my adaptation of your project? If so, how/where would you prefer I post it?

@Difinity I think it's a good idea to share your project on your github! thank you very much

yeah @Difinity please share your github repo with us. That would be a great help for those who want to use this project in angular-cli :+1:

no news?

any news

@Difinity Could u share the code?

@Difinity yeah i guess sharing your cli version would be awesome !

@Difinity - Just upload it as a public repo and post the link here.
Very keen for a CLI version :+1:

@Difinity @xiehongyang @noorahmed94 @Copois

It's not that bad to switch to an angular-cli yourself. I started a fresh angular-cli project and replaced the src/app directory with the current src/app directory. Then basically tried to run the app using ng serve and fixed any errors that popped up.

Some notes:

  1. Got rid of the bootstrap loader and similar dependencies and added this to angular-cli.json
      "styles": [
        "styles.css",
        "../node_modules/bootstrap/dist/css/bootstrap.min.css",
        "../node_modules/font-awesome/css/font-awesome.css"
      ],
      "scripts": [
        "../node_modules/ckeditor/ckeditor.js", 
        {
          "input": "../node_modules/jquery/dist/jquery.min.js",
          "lazy": true
        }
      ],

FYI, here is what my package.json looks like. Obviously I have some extra packages that not everyone needs.

"dependencies": {
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "@swimlane/ngx-datatable": "^7.1.1",
    "bootstrap": "4.0.0-alpha.4",
    "chart.js": "^2.4.0",
    "ckeditor": "4.6.2",
    "core-js": "^2.4.1",
    "dragula": "^3.7.2",
    "font-awesome": "^4.6.3",
    "font-awesome-sass-loader": "^1.0.2",
    "jquery": "^2.2.3",
    "leaflet": "1.0.3",
    "lodash": "^4.12.0",
    "moment": "^2.17.1",
    "ng2-bootstrap": "^1.6.1",
    "ng2-charts": "^1.5.0",
    "ng2-ckeditor": "https://github.com/swaheed2/ng2-ckeditor.git",
    "ng2-datetime-picker": "^0.14.2",
    "ng2-dragula": "^1.3.0",
    "ng2-pdf-viewer": "^1.0.2",
    "normalize.css": "^4.1.1",
    "rxjs": "^5.1.0",
    "zone.js": "^0.8.4"
  },
  "devDependencies": {
    "@angular/cli": "^1.0.0",
    "@angular/compiler": "^4.0.1",
    "@angular/compiler-cli": "^4.0.1",
    "@angular/platform-server": "^4.0.1",
    "@types/jasmine": "2.5.38",
    "@types/jquery": "^2.0.40",
    "@types/node": "~6.0.60",
    "codelyzer": "~2.0.0",
    "exports-loader": "^0.6.4",
    "imports-loader": "^0.7.1",
    "jasmine-core": "~2.5.2",
    "jasmine-spec-reporter": "~3.2.0",
    "karma": "~1.4.1",
    "karma-chrome-launcher": "~2.0.0",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^0.2.0",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.0",
    "ts-node": "~2.0.0",
    "tslint": "~4.5.0",
    "typescript": "^2.2.2"
  }

@lexzhukov @nnixaa Are there any plans to move to angular/cli in the near future or would you propose us not to count on that and to do so in the forks?

@Difinity, @swaheed2 or anyone who has succeeded in creating the ng2-admin project with ember-cli, would be really awesome if you could post a link to your repo.

I tried creating a new angular-cli project and copying the src/app and src/assets folders across. Here is my repo:
https://github.com/etewiah/pwb-ng-admin

Right now stuck at this error:
Module not found: Error: Can't resolve './assets/img/money.svg' in '/Users/mmm/Ed/sites-2017-feb-coddde/pwb-ng-admin/src/app'
@ ./~/exports-loader?module.exports.toString()!./~/css-loader?{"sourceMap":false,"importLoaders":1}!./~/postcss-loader!./~/sass-loader!./src/app/app.scss 6:122686-122719
@ ./~/style-loader!./src/app/app.scss
@ ./src/app/app.component.ts
@ ./src/app/app.module.ts
@ ./src/main.ts
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

@etewiah that's funny, I'm working on exactly the same errors at the moment :)

I had the same errors with other assets and fixed those by changing the URL by adding a slash at the beginning.

You also need to add a slash to $assets-root: '/assets/'

@Lucasvo1 awesome!! The power of github collaboration ;)

So I made the change you mentioned in:

src/app/theme/sass/conf/_variables.scss

Now I'm getting errors like this:

ERROR in /Users/mmm/Ed/sites-2017-feb-coddde/pwb-ng-admin/src/app/pages/dashboard/calendar/calendar.component.ts (35,9): Cannot find name 'jQuery'.
/Users/mmm/Ed/sites-2017-feb-coddde/pwb-ng-admin/src/app/pages/dashboard/calendar/calendar.component.ts (37,7): Cannot find name 'jQuery'.

ERROR in /Users/mmm/Ed/sites-2017-feb-coddde/pwb-ng-admin/src/app/pages/maps/components/bubbleMaps/bubbleMaps.service.ts (445,15): Cannot find name 'AmCharts'.

I have jquery and amcharts in the package.json but I don't know if there are some other things I need to do in addition.

If you do manage to get this going can you please share your repo? Thanks

Well it seems we are stuck in the same boat because I have the same Jquery issue you are mentioning :D

Okay. Let's hope someone else who has managed to do this jumps in to help.

@etewiah Add "../node_modules/jquery/dist/jquery.min.js" to your "scripts:" []" in angular-cli.json

After that I needed to change the default index.html app selector and now everything seems to work as before

Thanks @Lucasvo1 - I just tried that but still getting the same error :(

Did you install "@types/jquery": "2.0.41",?

Hi @Lucasvo1 , I didn't have @types/jquery installed before. Installed it now but no difference.

I need to go now but I'll try again this evening.

Hi @etewiah I think I know how to fix it. Just add "import * as $ from 'jquery';" to app.module.ts. It's working for me.

We moved ng2-admin to angular-cli today 🎉. You can download the latest version from cli branch.

@lexzhukov
cli version has some error when npm install

@ywcsz could you provide your error log from a console?

@lexzhukov
error

@lexzhukov Hooray and congrats! When it will become the master/main/default version instead of the current based on angular2-webpack-starter?

@ywcsz
On Windows it runs with a folder under full permission like the home / user folder

@Deilan yes, we are fixing the bugs now.

@lexzhukov good job and thank you so much, it works fine.

@lexzhukov the cli version has some issues:

  • Collapse menu button does not work, the left menu is not collapsed on button click
  • Left menu does not hide on small screens
  • User menu, that must appears on click user photo (top-right corner), don't show on click
  • The same situation applies to notifications and messages

That's what i found.

@LexBel-co thanks! We will take care of these.

@LexBel-co the issues are fixed. Try to check the latest cli version.

Thx a lot!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nfdavenport picture nfdavenport  Â·  3Comments

dreamerleolioa picture dreamerleolioa  Â·  4Comments

nsankaranarayanan picture nsankaranarayanan  Â·  3Comments

fabltd picture fabltd  Â·  3Comments

AZm1n picture AZm1n  Â·  4Comments