From 8868f236ee65e6b357079f80c10f070d6398e179 Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Fri, 28 Jun 2013 14:53:40 -0400 Subject: [PATCH] fix(tabs): Make tabset template correctly use tabset attributes (#584) * replace is now set to true in the tabset directive options --- src/tabs/tabs.js | 1 + src/tabs/test/tabsSpec.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index 851569c32e..9c67c179f4 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -80,6 +80,7 @@ function TabsetCtrl($scope, $element) { return { restrict: 'EA', transclude: true, + replace: true, scope: {}, controller: 'TabsetController', templateUrl: 'template/tabs/tabset.html', diff --git a/src/tabs/test/tabsSpec.js b/src/tabs/test/tabsSpec.js index ddaff4f28f..7f47d7fe69 100644 --- a/src/tabs/test/tabsSpec.js +++ b/src/tabs/test/tabsSpec.js @@ -36,7 +36,7 @@ describe('tabs', function() { scope.selectSecond = jasmine.createSpy(); elm = $compile([ '
', - ' ', + ' ', ' ', ' first content is {{first}}', ' ', @@ -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);