0

In the ng-admin basic example, using npm install it works, but using bower install, the view is empty. I've tried older versions, of ng-admin, but none of them renders anything.

  • 1
    "Basic example"? Where did you get this from? How is its code? Please, fill the question with some context, some code, show what you've tried so far. And also, please take some time to read this, so people can help you more easily: http://stackoverflow.com/help/how-to-ask – Tom Oct 24 '16 at 12:11

2 Answers2

0

I've found pretty much the same problem on a project that uses ng-admin.

First you should check which version of ng-admin is installed via npm intall and bower install

For bower install it's in a file called bower.json

For npm install it's in a file called package.json

If you do bower install ng-admin or npm install ng-adminyou will have to check https://www.npmjs.com/package/ng-admin or https://bower.io/

As there's no real changelog for alpha/beta of version 1.0 of ng-admin you should take a look at the git history to look for some important changes in commits.

Git of ng-admin is here: https://github.com/marmelab/ng-admin

Pro tip : browse history by tag (there's a tag for each version).

In my case I was switching from alpha5 to beta3. And there was backward compatibility break introduced by alpha6 : https://github.com/marmelab/ng-admin/commit/efa237419c14c3bf0fa5a13423d93a7f068dd8c8

The changes I have to apply were :

  • Rename my view from: <div ui-view> to: <div ui-view="ng-admin">

  • And to change every: parent: 'main' to: parent: 'ng-admin'

Hope it helps ;)

Marc_Alx
  • 1,285
  • 17
  • 25
0

ng-admin installed by bower is not up-to-date! and worse than that, it's broken, use npm install and copy build files in node_modules/ng-admin/build to your bower folder, I fixed it this way!

Josh Lin
  • 2,397
  • 11
  • 21
  • marmelab developer here, I confirm that bower is no longer supported for ng-admin 1.0 – Kmaschta Jan 18 '17 at 11:45
  • @Kmaschta I'm coding something to generate restful and admin codes using ng-admin, hope get suggestions from you! https://github.com/postor/express-mysql-restful-generator – Josh Lin Jan 19 '17 at 02:24