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:
@@ -1102,7 +1102,7 @@ export class NavController extends Ion {
|
||||
// class to the nav when it's finished its first transition
|
||||
if (!this._init) {
|
||||
this._init = true;
|
||||
this._renderer.setElementClass(this.elementRef, 'has-views', true);
|
||||
this._renderer.setElementClass(this.elementRef.nativeElement, 'has-views', true);
|
||||
}
|
||||
|
||||
// allow clicks and enable the app again
|
||||
@@ -1178,12 +1178,12 @@ export class NavController extends Ion {
|
||||
|
||||
// auto-add page css className created from component JS class name
|
||||
let cssClassName = pascalCaseToDashCase(view.componentType['name']);
|
||||
this._renderer.setElementClass(pageElementRef, cssClassName, true);
|
||||
this._renderer.setElementClass(pageElementRef.nativeElement, cssClassName, true);
|
||||
|
||||
view.addDestroy(() => {
|
||||
// ensure the element is cleaned up for when the view pool reuses this element
|
||||
this._renderer.setElementAttribute(pageElementRef, 'class', null);
|
||||
this._renderer.setElementAttribute(pageElementRef, 'style', null);
|
||||
this._renderer.setElementAttribute(pageElementRef.nativeElement, 'class', null);
|
||||
this._renderer.setElementAttribute(pageElementRef.nativeElement, 'style', null);
|
||||
|
||||
// remove the page from its container
|
||||
let index = viewContainer.indexOf(hostViewRef);
|
||||
|
||||
@@ -101,7 +101,7 @@ import {ViewController} from './view-controller';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ion-nav',
|
||||
template: '<template #contents></template>'
|
||||
template: '<div #contents></div>'
|
||||
})
|
||||
export class Nav extends NavController {
|
||||
@Input() root: Type;
|
||||
|
||||
@@ -165,11 +165,11 @@ export class ViewController {
|
||||
|
||||
this._hdAttr = (shouldShow ? null : '');
|
||||
|
||||
renderer.setElementAttribute(this._pgRef, 'hidden', this._hdAttr);
|
||||
renderer.setElementAttribute(this._pgRef.nativeElement, 'hidden', this._hdAttr);
|
||||
|
||||
let navbarRef = this.navbarRef();
|
||||
if (navbarRef) {
|
||||
renderer.setElementAttribute(navbarRef, 'hidden', this._hdAttr);
|
||||
renderer.setElementAttribute(navbarRef.nativeElement, 'hidden', this._hdAttr);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ export class ViewController {
|
||||
setZIndex(zIndex: number, renderer: Renderer) {
|
||||
if (this._pgRef && zIndex !== this.zIndex) {
|
||||
this.zIndex = zIndex;
|
||||
renderer.setElementStyle(this._pgRef, 'z-index', zIndex.toString());
|
||||
renderer.setElementStyle(this._pgRef.nativeElement, 'z-index', zIndex.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user