mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 23:16:52 +08:00
TabBar code fix
This commit is contained in:
@ -21,7 +21,7 @@ ionic.ui.TabBarItem.prototype = {
|
|||||||
}
|
}
|
||||||
item.appendChild(document.createTextNode(itemData.title));
|
item.appendChild(document.createTextNode(itemData.title));
|
||||||
|
|
||||||
return new TabBarItem(item);
|
return new ionic.ui.TabBarItem(item);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ ionic.ui.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
|
// Create a new TabItem
|
||||||
var tabItem = TabBarItem.prototype.create(item);
|
var tabItem = ionic.ui.TabBarItem.prototype.create(item);
|
||||||
|
|
||||||
this.appendItemElement(tabItem);
|
this.appendItemElement(tabItem);
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ ionic.ui.TabBar.prototype = {
|
|||||||
var item, items = Array.prototype.slice.call(this.el.children);
|
var item, items = Array.prototype.slice.call(this.el.children);
|
||||||
|
|
||||||
for(var i = 0, j = items.length; i < j; i += 1) {
|
for(var i = 0, j = items.length; i < j; i += 1) {
|
||||||
item = new TabBarItem(items[i]);
|
item = new ionic.ui.TabBarItem(items[i]);
|
||||||
this.items[i] = item;
|
this.items[i] = item;
|
||||||
this._bindEventsOnItem(item);
|
this._bindEventsOnItem(item);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -136,12 +136,13 @@
|
|||||||
|
|
||||||
<script src="../../js/events.js"></script>
|
<script src="../../js/events.js"></script>
|
||||||
<script src="../../js/gestures.js"></script>
|
<script src="../../js/gestures.js"></script>
|
||||||
|
<script src="../../js/views/tabBar.js"></script>
|
||||||
<script src="../../js/controllers/tabBarController.js"></script>
|
<script src="../../js/controllers/tabBarController.js"></script>
|
||||||
<script>
|
<script>
|
||||||
// Grab the sections
|
// Grab the sections
|
||||||
var tab = document.getElementById('tab-bar');
|
var tab = document.getElementById('tab-bar');
|
||||||
var controller = new ionic.controllers.TabController({
|
var controller = new ionic.controllers.TabBarController({
|
||||||
tab: tab
|
tabBar: new ionic.ui.TabBar({ el: tab })
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user