【发布时间】:2016-10-21 08:09:55
【问题描述】:
我正在尝试在我的 angular2 应用程序中使用引导字形图标。我已经使用命令 npm install bootstrap --save 安装了引导程序 我的代码 sn-p 是
<button *ngIf="pos.name == uname" type="button" class="btn btn-default btn-sm delete" (click)="DeleteBulletin();">
<span class="glyphicon glyphicon-trash glyph"></span> Delete
</button>
我的 styleUrls 中包含了 bootstrap- styleUrls: ['node_modules/bootstrap/dist/css/bootstrap.min.css', 'app/home.component.css']
【问题讨论】:
-
您可以检查控制台是否有
404错误,它会尝试加载字体文件。 -
fyi,Bootstrap 4 放弃了 Glyphicon 图标字体
-
删除了 Glyphicons 图标字体。如果您需要图标,一些选项是:Glyphicons Octicons Font Awesome 的上游版本
标签: css twitter-bootstrap web angular glyphicons