perf(): raf updates

This commit is contained in:
Adam Bradley
2015-11-20 20:24:17 -06:00
parent f66155904c
commit 002e5e86a6
5 changed files with 50 additions and 39 deletions

View File

@@ -27,11 +27,13 @@ export class IonicApp {
* @param {string} val Value to set the document title to.
*/
setTitle(val) {
if (val !== this._title) {
this._title = val;
rafFrames(4, () => {
this._titleSrv.setTitle(this._title);
});
let self = this;
if (val !== self._title) {
self._title = val;
function setAppTitle() {
self._titleSrv.setTitle(self._title);
}
rafFrames(4, setAppTitle);
}
}