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

Commit

Permalink
fix(tabs): Make tabset template correctly use tabset attributes (#584)
Browse files Browse the repository at this point in the history
* replace is now set to true in the tabset directive options
  • Loading branch information
ajoslin committed Jun 28, 2013
1 parent be7ecff commit 8868f23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function TabsetCtrl($scope, $element) {
return {
restrict: 'EA',
transclude: true,
replace: true,
scope: {},
controller: 'TabsetController',
templateUrl: 'template/tabs/tabset.html',
Expand Down
8 changes: 7 additions & 1 deletion src/tabs/test/tabsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('tabs', function() {
scope.selectSecond = jasmine.createSpy();
elm = $compile([
'<div>',
' <tabset>',
' <tabset class="hello" data-pizza="pepperoni">',
' <tab heading="First Tab {{first}}" active="actives.one" select="selectFirst()">',
' first content is {{first}}',
' </tab>',
Expand All @@ -51,6 +51,12 @@ describe('tabs', function() {
return elm;
}));

it('should pass class and other attributes on to tab template', function() {
var tabbable = elm.find('.tabbable');
expect(tabbable).toHaveClass('hello');
expect(tabbable.attr('data-pizza')).toBe('pepperoni');
});

it('should create clickable titles', function() {
var t = titles();
expect(t.length).toBe(2);
Expand Down

0 comments on commit 8868f23

Please sign in to comment.