0

我正在尝试使用 rails 和 haml 创建一个新的引导选项卡,但是当我尝试添加数据切换属性时出现错误。

这有效:

%a{href: '#tab2'} tab2

%a{href: '#tab2'} tab2

这给了我一个错误:

 %a{href: '#tab2', data-toggle: 'tab'} tab2
4

1 回答 1

3
%a{ href: '#tab2', data: { toggle: 'tab' } } tab2

或者

%a{ href: '#tab2', 'data-toggle' => 'tab' } tab2
于 2013-11-07T21:53:24.067 回答