[英]ng-admin show empty view using bower install
In the ng-admin basic example, using npm install it works, but using bower install , the view is empty. 在ng-admin基本示例中,使用npm install可以运行,但是使用bower install ,视图为空。 I've tried older versions, of ng-admin, but none of them renders anything.
我尝试了较旧的ng-admin版本,但没有一个可以呈现任何内容。
I've found pretty much the same problem on a project that uses ng-admin
. 我在使用
ng-admin
的项目中发现了几乎相同的问题。
First you should check which version of ng-admin
is installed via npm intall
and bower install
首先,您应该检查通过
npm intall
和bower install
的ng-admin
版本。
For bower install
it's in a file called bower.json
对于
bower install
它位于一个名为bower.json
的文件中
For npm install
it's in a file called package.json
对于
npm install
它位于一个名为package.json
的文件中
If you do bower install ng-admin
or npm install ng-admin
you will have to check https://www.npmjs.com/package/ng-admin or https://bower.io/ 如果您进行
bower install ng-admin
或npm install ng-admin
,则必须检查https://www.npmjs.com/package/ng-admin或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. 由于没有ng-admin 1.0版的alpha / beta的真实更改日志,因此您应该查看git历史记录以查找提交中的一些重要更改。
Git of ng-admin is here: https://github.com/marmelab/ng-admin ng-admin的Git在这里: 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. 就我而言,我是从alpha5切换到beta3。 And there was backward compatibility break introduced by alpha6 : https://github.com/marmelab/ng-admin/commit/efa237419c14c3bf0fa5a13423d93a7f068dd8c8
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">
将我的视图从:
<div ui-view>
重命名为: <div ui-view="ng-admin">
And to change every: parent: 'main'
to: parent: 'ng-admin'
并将每个:
parent: 'main'
更改为: parent: 'ng-admin'
Hope it helps ;) 希望能帮助到你 ;)
ng-admin installed by bower is not up-to-date! bower安装的ng-admin不是最新的! 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!
更糟糕的是,它已损坏,请使用npm install并将node_modules / ng-admin / build中的构建文件复制到您的bower文件夹中,我已通过这种方式修复了它!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.