Angular开发 使用 ngx-bootstrap作为样式库
2018-02-08 11:45
671 查看
ngx-bootstrap里面可以复制你想要的样式组件,官方有介绍怎么使用,不过本人稍微修改了下
使用ngx-bootstrap的步骤1、npm install ngx-bootstrap –save
2、npm install bootstarap –save-dev
3、在angular-cli.json文件中添加bootstrap为全局样式
"styles": [ "styles.css", "../node_modules/bootstrap/dist/css/bootstrap.css" ],1
2
3
4
4、根据官方文档中你需要使用什么样式就要在
app.module.ts注入
import { AccordionModule,AlertModule,ButtonsModule } from 'ngx-bootstrap'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, FormsModule, HttpModule, AccordionModule.forRoot(), AlertModule.forRoot(), ButtonsModule.forRoot() ],1
2
3
4
5
6
7
8
9
10
11
12
13
14
5、直接官网复制代码
相关文章推荐
- Angular14 Visual Studio Code作为Angular开发工具常用插件安装、json-server安装与使用、angular/cli安装失败问题、emmet安装
- Angular UI ngx-bootstrap 使用说明
- 使用Angular 4、Bootstrap 4、TypeScript和ASP.NET Core开发的Apworks框架案例应用:Task List
- Angular开发-ngx-bootstrap的UI组件介绍
- 使用Angular 4、Bootstrap 4、TypeScript和ASP.NET Core开发的Apworks框架案例应用
- 【个人笔记重点,不作为参考】主题:Angular2中使用ngx-translate进行国际化
- 使用 Eclipse 作为 Jakarta Tomcat 的开发环境
- 使用 Eclipse 作为 Jakarta Tomcat 的开发环境 link
- 使用 Eclipse 作为 Jakarta Tomcat 的开发环境
- ASP.NET开发经验 --- 使用 GUID 值来作为数据库行标识
- 第二部分:使用Jasperreport作为报表控件开发胖客户端报表应用
- 使用Jasperreport作为报表控件开发Web 报表应用 后续
- 使用ubuntu 作为便携的开发平台(一)
- 在eclipse3.4中,使用tomcat6作为container,开发jsf1.2-web
- 本文介绍使用AXIS作为开发环境来体会Web服务的开发过程。
- [Flex]为什么国内的公司都不敢使用Flex作为产品的平台与主要开发语言
- [Flex]为什么国内的公司都不敢使用Flex作为产品的平台与主要开发语言
- 使用PhpMyAdmin和网际数据库浏览器作为MySQL建站开发工具
- 由于Python本身自带的界面库功能并不强大,我们使用Python+wxPython作为界面开发平台,在公司新的项目中进行界面开发。开发过程使用Eclipse+PyDev 作为集成开发环境。产品发布时使用Py2exe进行打包。如今,在我的团队中,Pytho
- 使用 Eclipse 作为 Jakarta Tomcat 的开发环境