I like to stay in a team when I feel happy in the team. So what is the factors of having a happy team:
1) The team has tasks of build challenge feature. It is not argue that everyone want exiting and challenge jobs. If the job is boring, people will feel unhappy, and not be motivated.
2) You can grow your career in the team
3) Your achievement be truly appreciated.
4) Decision making be less political, but be more technical.
5) The culture of the team be open, honest, respectful and people enjoy to work together.
6) In the team, Family is always higher priority that the works.
7) The team can provide flexible working environment, so that we can have work and life balance. Team member can have some freedom to manage their time, such as learning/training, doing side project, etc. Be macro managing people rather that micro managing them.
NOTE: this blog is a draft, I will add more content to it