简体   繁体   English

如何在angularjs中通过npm安装angular-ui-bootstrap?

[英]How to install angular-ui-bootstrap via npm in angularjs?

I am trying to install angular-ui-bootstrap in the following steps: 1. npm install angular-ui-bootstrap 2. import uiBootstrap from 'angular-ui-bootstrap'; 我正在尝试通过以下步骤npm install angular-ui-bootstrap :1. npm install angular-ui-bootstrap 2. import uiBootstrap from 'angular-ui-bootstrap'; 3. angular.module ('app', [ uiBootstrap ]) 3. angular.module ('app', [ uiBootstrap ])

I want to add: 我要添加:

<pager total-items="totalItems" ng-model="currentPage" items-per- 
page="itemsPerPage"></pager>

In the package.json file, I do not see any dependencies named angular-ui-bootstrap 在package.json文件中,我看不到任何名为angular-ui-bootstrap依赖angular-ui-bootstrap

Run this: 运行这个:

npm install angular-ui-bootstrap --save . npm install angular-ui-bootstrap --save

The flag --save should add the dependency to package.json file. 标志--save应该将依赖项添加到package.json文件。

Also, you will need to add the link to the CSS file path into the index.html to load the CSS. 另外,您需要将指向CSS文件路径的链接添加到index.html以加载CSS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM