angular change detection not working until click