Ionic3 / Angular2 view render multiple time

一笑奈何 提交于 2019-12-12 01:57:28

问题


I created a new ionic 3 project. In my HomePage, i have only one varible and one function:

count = 0;
printLog() {
    console.log("count", ++this.count);
}

In template home.html i call this function by interpolation binding:

{{printLog()}}

It is my whole code. In the console i see the log:

As we can see the printLog function were called 9 times. I can't understand why. Can someone tell me why and how does it work?
Many thanks!

来源:https://stackoverflow.com/questions/44402257/ionic3-angular2-view-render-multiple-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!