mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 14:19:17 +08:00
Working on tab bar
This commit is contained in:
@ -90,6 +90,7 @@ TabBar.prototype = {
|
||||
|
||||
// Add an item to the tab bar
|
||||
addItem: function(item) {
|
||||
// Create a new TabItem
|
||||
this.items.push(item);
|
||||
this._bindEventsOnItem(item);
|
||||
},
|
||||
|
||||
@ -5,17 +5,12 @@ describe('TabBarController', function() {
|
||||
var tabEl = $('<div class="tabs"></div>');
|
||||
ctrl = new TabBarController({
|
||||
tabBar: new TabBar({
|
||||
el: tabEl.get(0),
|
||||
itemAdded: function(item) {
|
||||
},
|
||||
itemRemoved: function(item) {
|
||||
}
|
||||
el: tabEl.get(0)
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
it('Should add Controllers', function() {
|
||||
debugger;
|
||||
ctrl.addController({
|
||||
title: 'Item 1',
|
||||
icon: 'icon-home',
|
||||
|
||||
Reference in New Issue
Block a user