angular 2.0 equivalent to $scope.$apply

后端 未结 3 634
一向
一向 2020-12-29 05:22

I am trying to get started with angular 2.0, now I was wondering how I can initiate an update to the view after some external event changed data.

In details I have a

3条回答
  •  天命终不由人
    2020-12-29 05:55

    setTimeout(function(){
    //whatever u want here
    },0)
    

    ref : http://blog.mgechev.com/2015/04/06/angular2-first-impressions/

提交回复
热议问题