【发布时间】:2016-03-18 12:01:44
【问题描述】:
给定这个haml代码
%uib-pagination{:boundary-links => "true", :total-items => "totalItems", :ng-model => "currentPage", :class => "pagination-sm", :previous-text => "‹", :next-text => "›", :first-text => "«", :last-text => "»"}
输出如下所示
<uib>-pagination{:boundary-links => "true", :total-items => "totalItems", :ng-model => "currentPage", :class => "pagination-sm", :previous-text => "‹", :next-text => "›", :first-text => "«", :last-text => "»"}</uib>
是否可以设置破折号?
【问题讨论】:
-
你是如何生成 HTML 的? Haml 的 Ruby 实现不会给出这样的结果,你会得到一个类似
undefined local variable or method `links'的错误(你需要在属性中使用字符串而不是符号来避免这种情况)。 -
@matt,我正在使用
hamlpypython 库。