mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-08 23:58:13 +08:00
Angular and non-angular Tabs Working
Tests passing
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user