Angular2 - Expression has changed after it was checked - Binding to div width with resize events

前端 未结 4 666
清歌不尽
清歌不尽 2020-12-01 02:10

I have done some reading and investigation on this error, but not sure what the correct answer is for my situation. I understand that in dev mode, change detection runs twic

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 02:30

    Simply use

    setTimeout(() => {
      //Your expression to change if state
    });
    

提交回复
热议问题