Bootstrap Glyphicons 未以 angular2 显示

新手上路,请多包涵

我正在尝试在我的 angular2 应用程序中使用引导字形图标。我已经使用命令 npm install bootstrap –save 安装了引导程序 我的代码片段是

 <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-styleUrls 中包含了引导程序:[‘node_modules/bootstrap/dist/css/bootstrap.min.css’, ‘app/home.component.css’]

字形图标如图所示 - 在此处输入图像描述

原文由 Sahana ys 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 584
1 个回答

如果您使用的是 bootstrap 4 glyphicon 不再受支持,您应该尝试旧版本

原文由 Sohaib El Mediouni 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题