chore(angular): upgrade to angular 2.0.0-beta.1

Biggest change was that renderer takes  and not just .
This commit is contained in:
Adam Bradley
2016-01-20 11:15:01 -06:00
parent 94ef1f4ce1
commit ee106377fc
21 changed files with 163 additions and 107 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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());
}
}