preventdefault swipeback

Closes #40
This commit is contained in:
Adam Bradley
2015-05-31 20:38:44 -05:00
parent 45cb7d7189
commit f554cc51df
4 changed files with 26 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ import {Tabs} from './tabs';
properties: ['tab'],
hostProperties: {
'btnId': 'attr.id',
'ariaControls': 'attr.aria-controls',
'panelId': 'attr.aria-controls',
'tab.isSelected': 'attr.aria-selected'
},
hostAttributes: {
@@ -28,7 +28,7 @@ export class TabButton {
onInit() {
this.btnId = 'tab-button-' + this.tab.id;
this.ariaControls = 'tab-content-' + this.tab.id;
this.panelId = 'tab-panel-' + this.tab.id;
}
onClick(ev) {

View File

@@ -6,10 +6,10 @@ import {Injector} from 'angular2/di';
import {Tabs} from './tabs';
import {Content} from '../content/content';
import * as util from 'ionic/util';
import {IonicComponent} from 'ionic/config/component';
import {NavBase} from '../nav/nav-base';
let tabId = -1;
@Directive({
selector: 'ion-tab',
@@ -19,7 +19,7 @@ import {NavBase} from '../nav/nav-base';
'tabIcon'
],
hostProperties: {
'contentId': 'attr.id',
'panelId': 'attr.id',
'labeledBy': 'attr.aria-labelledby',
'ariaHidden': 'attr.aria-hidden',
'isSelected': 'class.show-tab'
@@ -38,8 +38,8 @@ export class Tab {
this.nav = new NavBase(loader, injector);
this.domElement = elementRef.domElement;
this.id = util.nextUid();
this.contentId = 'tab-content-' + this.id;
this.id = ++tabId;
this.panelId = 'tab-panel-' + this.id;
this.labeledBy = 'tab-button-' + this.id;
tabs.addTab(this);