Add a $timeout to make sure the scope has digest before updating.