Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 8868f23

Browse files
committed
fix(tabs): Make tabset template correctly use tabset attributes (#584)
* replace is now set to true in the tabset directive options
1 parent be7ecff commit 8868f23

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/tabs/tabs.js

+1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ function TabsetCtrl($scope, $element) {
8080
return {
8181
restrict: 'EA',
8282
transclude: true,
83+
replace: true,
8384
scope: {},
8485
controller: 'TabsetController',
8586
templateUrl: 'template/tabs/tabset.html',

src/tabs/test/tabsSpec.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ describe('tabs', function() {
3636
scope.selectSecond = jasmine.createSpy();
3737
elm = $compile([
3838
'<div>',
39-
' <tabset>',
39+
' <tabset class="hello" data-pizza="pepperoni">',
4040
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()">',
4141
' first content is {{first}}',
4242
' </tab>',
@@ -51,6 +51,12 @@ describe('tabs', function() {
5151
return elm;
5252
}));
5353

54+
it('should pass class and other attributes on to tab template', function() {
55+
var tabbable = elm.find('.tabbable');
56+
expect(tabbable).toHaveClass('hello');
57+
expect(tabbable.attr('data-pizza')).toBe('pepperoni');
58+
});
59+
5460
it('should create clickable titles', function() {
5561
var t = titles();
5662
expect(t.length).toBe(2);

0 commit comments

Comments
 (0)