diff --git a/src/components/navbar/navbar.ts b/src/components/navbar/navbar.ts
index 1fa21661b8b..902a53206be 100644
--- a/src/components/navbar/navbar.ts
+++ b/src/components/navbar/navbar.ts
@@ -1,4 +1,4 @@
-import { Component, ElementRef, Input, Optional, Renderer, ViewChild } from '@angular/core';
+import { Component, ElementRef, Input, Optional, Renderer } from '@angular/core';
import { App } from '../app/app';
import { Config } from '../../config/config';
@@ -49,10 +49,8 @@ import { ViewController } from '../../navigation/view-controller';
template:
'
' +
'' +
'' +
'' +
@@ -70,7 +68,7 @@ export class Navbar extends ToolbarBase {
/**
* @private
*/
- @ViewChild('bbTxt') _bbTxt: ElementRef;
+ _backText: string;
/**
* @private
*/
@@ -129,11 +127,9 @@ export class Navbar extends ToolbarBase {
this._bbIcon = config.get('backButtonIcon');
this._sbPadding = config.getBoolean('statusbarPadding');
+ this._backText = config.get('backButtonText', 'Back');
}
- ngAfterViewInit() {
- this.setBackButtonText(this._config.get('backButtonText', 'Back'));
- }
backButtonClick(ev: UIEvent) {
ev.preventDefault();
@@ -146,7 +142,7 @@ export class Navbar extends ToolbarBase {
* Set the text of the Back Button in the Nav Bar. Defaults to "Back".
*/
setBackButtonText(text: string) {
- this._renderer.setText(this._bbTxt.nativeElement, text);
+ this._backText = text;
}
/**