我試圖在下拉菜單的鏈接左側添加一個圖標,但似乎無法弄清楚。這是我的代碼看起來像:如何將glyphicon添加到引導程序下拉菜單
<div class="col-md-4">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">options
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><i class="glyphicon glyphicon-flag"></i><%=link_to "report link", report_path(report: {reportable_id: post.id, reportable_type: "Post"}), id: "report_#{post.class}_#{post.id}", class: "report_link", remote: true, method: :post %></li>
有人可以請向我解釋如何做到這一點?
謝謝!