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