Rc0 Logging at the end of my html page executed MANY MANY times


#1

I added this directly before my content block on my first TabsPage after my tutorial is executed. I’ve setup my pages to be just like the Conference App.

In my home.ts
log(value: any){
console.log('page: ’ +value);
}

Tail of my home.html
{{log(‘end page’)}}

When the page is first loaded I see this written to the logs about 20 times. When I click to another tab and click back I see it executed twice.

Is anyone else seeing this behavior? I cannot get the application to function on android and am trying to determine if this is a factor.

Thank you!


#2

With the exact same code… on Android it logs end page indefinitely… roughly 1 per 10ms.

This seems like a big problem to me… Anyone else?


#3

It gets worse!!! I’ve simplified my app to just the following:

import {Component} from “@angular/core”;
@Component({
templateUrl: ‘home.html’
})
export class HomePage {
constructor() {}

log(value: any){
console.log('page: ’ +value);
}
}

and home.html to the following:

{{log(‘end page’)}}

This is the end result when it runs on android:
0 591891 log DEVICE READY FIRED AFTER, 1043, ms
1 591902 log DEVICE READY FIRED AFTER, 875, ms
2 591906 log DEVICE READY FIRED AFTER, 797, ms
3 599404 log going from slides to tab page
4 599553 log page: end page
5 599574 log page: end page
6 599612 log page: end page
7 599634 log page: end page
8 599693 log page: end page
9 599702 log page: end page
10 599709 log page: end page
11 599712 log page: end page
12 599713 log page: end page
13 599715 log page: end page
14 599717 log page: end page
15 599719 log page: end page
16 599720 log page: end page
17 599722 log page: end page
18 599724 log page: end page
19 599791 log page: end page
20 599793 log page: end page
21 599849 log page: end page
22 599851 log page: end page
23 599892 log page: end page
24 599903 log page: end page
… I run forever and never stop…


#4

What happens if you return a constant (like ‘logged’) from log()?


#5

No difference in behavior. I changed it to the following:

log(){
console.log(‘test log’);
return ‘static content’;
}

It still runs every few milliseconds and the behavior difference between ionic serve and ionic run android is still there.


#6

Was there any resolution? I’m having the same problem with my app right now. It’s logging 20+ times on every log. It now takes my home view almost 15 seconds to load.