国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

詳解在Angular項目中添加插件ng-bootstrap

2019-11-19 16:11:07
字體:
來源:轉載
供稿:網友

npm 安裝 ng-bootstrap 模塊

npm install @ng-bootstrap/ng-bootstrap --save

在 Angular 項目配置

app.module.ts

添加

import { NgbModule } from "@ng-bootstrap/ng-bootstrap"; imports: [  /**   * ngx-bootstrap   */  NgbModule.forRoot() ],

添加 bootstrap.min.css 樣式

在 assets 文件夾下 bootstrap/bootstrap.min.css , 并在 style.css 文件中添加

@import "assets/bootstrap/bootstrap.min.css";

測試

app.component.html

添加代碼:

<div> <span> test the ng-bootstrap</span> <div [(ngModel)]="model" ngbRadioGroup name="radioBasic">  <label class="btn btn-primary">   <input type="radio" [value]="1"> Left (pre-checked)  </label>  <label class="btn btn-primary">   <input type="radio" value="middle"> Middle  </label>  <label class="btn btn-primary">   <input type="radio" [value]="false"> Right  </label> </div> <hr> <pre>{{model}}</pre></div>

測試結果

示例代碼

angular + ng-bootstrap

參考文章

NG Bootstrap - Angular directives specific to Bootstrap 4

Bootstrap 4 components, powered by Angular

ngx-translate core

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持武林網。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 宣汉县| 岳西县| 名山县| 体育| 汝南县| 固始县| 大丰市| 成安县| 安顺市| 荥阳市| 柳林县| 麦盖提县| 涿鹿县| 麟游县| 新河县| 沙田区| 安西县| 都江堰市| 循化| 德格县| 荣昌县| 南郑县| 商水县| 若羌县| 绩溪县| 即墨市| 墨江| 都江堰市| 江津市| 方山县| 阿巴嘎旗| 铁力市| 余姚市| 定安县| 五原县| 依安县| 当涂县| 新龙县| 齐齐哈尔市| 肇东市| 内黄县|