mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(angular): upgrade to angular 2.0.0-beta.1
Biggest change was that renderer takes and not just .
This commit is contained in:
@@ -90,7 +90,7 @@ import {TabButton} from './tab-button';
|
||||
'[attr.aria-labelledby]': '_btnId',
|
||||
'role': 'tabpanel'
|
||||
},
|
||||
template: '<template #contents></template>'
|
||||
template: '<div #contents></div>'
|
||||
})
|
||||
export class Tab extends NavController {
|
||||
public isSelected: boolean;
|
||||
|
||||
@@ -69,16 +69,16 @@ export class Tabs extends Ion {
|
||||
private _tabs: Array<Tab> = [];
|
||||
private _onReady = null;
|
||||
private _useHighlight: boolean;
|
||||
|
||||
|
||||
id: number;
|
||||
navbarContainerRef: ViewContainerRef;
|
||||
subPages: boolean;
|
||||
|
||||
|
||||
@Input() preloadTabs: any;
|
||||
@Input() tabbarIcons: string;
|
||||
@Input() tabbarPlacement: string;
|
||||
@Output() change: EventEmitter<Tab> = new EventEmitter();
|
||||
|
||||
|
||||
@ViewChild(TabHighlight) private _highlight: TabHighlight;
|
||||
@ViewChildren(TabButton) private _btns;
|
||||
|
||||
@@ -92,7 +92,7 @@ export class Tabs extends Ion {
|
||||
private _renderer: Renderer
|
||||
) {
|
||||
super(_elementRef);
|
||||
|
||||
|
||||
this.id = ++tabIds;
|
||||
this.subPages = _config.getBoolean('tabSubPages');
|
||||
this._useHighlight = _config.getBoolean('tabbarHighlight');
|
||||
@@ -125,7 +125,7 @@ export class Tabs extends Ion {
|
||||
this._highlight.select(this.getSelected());
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this._btns.toArray().forEach((tabButton: TabButton) => {
|
||||
tabButton.select.subscribe((tab: Tab) => {
|
||||
this.select(tab);
|
||||
@@ -133,12 +133,15 @@ export class Tabs extends Ion {
|
||||
});
|
||||
}
|
||||
|
||||
_setConfig(attrKey, fallback) {
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
private _setConfig(attrKey, fallback) {
|
||||
var val = this[attrKey];
|
||||
if (isUndefined(val)) {
|
||||
val = this._config.get(attrKey);
|
||||
}
|
||||
this._renderer.setElementAttribute(this._elementRef, attrKey, val);
|
||||
this._renderer.setElementAttribute(this._elementRef.nativeElement, attrKey, val);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -248,7 +251,7 @@ export class Tabs extends Ion {
|
||||
* "Touch" the active tab, going back to the root view of the tab
|
||||
* or optionally letting the tab handle the event
|
||||
*/
|
||||
_touchActive(tab) {
|
||||
private _touchActive(tab) {
|
||||
let active = tab.getActive();
|
||||
|
||||
if (!active) {
|
||||
|
||||
Reference in New Issue
Block a user