Angular and non-angular Tabs Working

Tests passing
This commit is contained in:
Max Lynch
2013-09-19 22:28:59 -05:00
parent 31f25b4134
commit 4a8b35326f
3 changed files with 28 additions and 21 deletions

View File

@ -91,8 +91,19 @@ TabBar.prototype = {
// Add an item to the tab bar
addItem: function(item) {
// Create a new TabItem
this.items.push(item);
this._bindEventsOnItem(item);
var tabItem = TabBarItem.prototype.create(item);
this.appendItemElement(tabItem);
this.items.push(tabItem);
this._bindEventsOnItem(tabItem);
},
appendItemElement: function(item) {
if(!this.el) {
return;
}
this.el.appendChild(item.el);
},
// Remove an item from the tab bar