Skip to content

Commit f9d3485

Browse files
committed
* Remove commented Angular code in Vue.js sample and replace with basic use case
* Fix typo in Angular BottomNavigation sample
1 parent ea8ab1a commit f9d3485

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<GridLayout class="p-20">
2-
<Label class="h1 text-center" text="Thrid tab" textWrap="true"></Label>
2+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
33
</GridLayout>

demo-vue/app/examples/BottomNavigationBar.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
</ActionBar>
66
<GridLayout rows="*, auto" backgroundColor="blue">
77
<StackLayout class="page" backgroundColor="white" row="0">
8-
<!-- <ns-first-tab *ngSwitchDefault></ns-first-tab> -->
9-
<!-- <ns-third-tab *ngSwitchCase="2"></ns-third-tab> -->
8+
<GridLayout class="p-20" v-if="currentTab === 0"> -->
9+
<Label class="h1 text-center" text="First tab" textWrap="true"></Label>
10+
</GridLayout> -->
11+
<GridLayout class="p-20" v-if="currentTab === 2">
12+
<Label class="h1 text-center" text="Third tab" textWrap="true"></Label>
13+
</GridLayout>
1014
</StackLayout>
1115
<MDBottomNavigationBar row="1" activeColor="red" @loaded="onbottomNavigationBarLoaded">
1216
<MDBottomNavigationTab title="First" icon="res://ic_home" activeColor="green"/>
@@ -30,7 +34,8 @@ export default Vue.extend({
3034
name: 'BottomNavigationBar',
3135
data() {
3236
return {
33-
title: title
37+
title: title,
38+
currentTab: 0
3439
};
3540
},
3641
methods: {
@@ -51,6 +56,7 @@ export default Vue.extend({
5156
onBottomNavigationTabSelected(args: TabSelectedEventData): void {
5257
console.log(`old tab index: ${args.oldIndex}`);
5358
console.log(`selected tab index: ${args.newIndex}`);
59+
this.currentTab = args.newIndex;
5460
},
5561
5662
onBottomNavigationTabReselected(args: TabReselectedEventData): void {

0 commit comments

Comments
 (0)