Bra*_*kit 5 angular ngx-bootstrap-modal
我可能无法将ngx-bootstrap安装到我的angular 4项目中,因此无法使用预定义的模板.我已经通过以下两个链接进行ngx-bootstrap安装,请指导我正确的方法.
https://valor-software.com/ngx-bootstrap/#/getting-started
https://loiane.com/2017/08/how-to-add-bootstrap-to-an-angular-cli-project/
ngx-bootstrap包含由Angular提供支持的所有核心(而不仅仅是)Bootstrap组件.因此,您不需要包含原始JS组件,但我们使用的是Bootstrap提供的标记和CSS.
安装说明
查看他们在Github上的官方入门页面.
控件和文档可在此处获得.
从npm安装ngx-bootstrap:
npm install ngx-bootstrap --save
Run Code Online (Sandbox Code Playgroud)
向NgModule导入添加所需的包:
import { TooltipModule } from 'ngx-bootstrap/tooltip';
@NgModule({
...
imports: [TooltipModule.forRoot(),...]
...
})
Run Code Online (Sandbox Code Playgroud)
将组件添加到您的页面:
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
</button>
Run Code Online (Sandbox Code Playgroud)
您将需要引导程序样式:
Bootstrap 3
<!-- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)
Bootstrap 4
<!--- index.html -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7257 次 |
| 最近记录: |