Transform.eulerAngles does not work

On the below code, the object “Boomerang” should follow a “Player” and rotate on the Y axis (when the player go left or right).
But the both lines:
→ transform.eulerAngles = new Vector2 (0, 0);
→ transform.eulerAngles = new Vector2 (0, 180);
…does not seem to do anything.

The boomerang does not rotate at all, and in Transform → Rotation → Y keep display “0”.
In the console, the two print return:

0
UnityEngine.Monobehaviour:print(Object)

1
UnityEngine.Monobehaviour:print(Object)

Any idea?

Below my code:

using UnityEngine;
using System.Collections;

public class BoomerangController : MonoBehaviour {

	public Animator anim;
	public PlayerController player;

	// Use this for initialization
	void Start () {
		anim = GetComponent<Animator> ();
	}

	void Update () {
		Physics2D.IgnoreCollision (player.collider2D, collider2D);
		if(player.getDirection() == "right"){
			transform.eulerAngles = new Vector2 (0, 0);
                    print (transform.rotation.y);
		} else if (player.getDirection() == "left"){
			transform.eulerAngles = new Vector2 (0, 180);
                    print (transform.rotation.y);
		}
	}

	void LateUpdate(){
		transform.position = new Vector2 (player.transform.position.x, player.transform.position.y - 0.1f);
	}
}

If you work with SpriteRenderer and want to flip your sprite (as well as your colliders and else) you NEED and MUST change your scale. like

Vector3 currentScale = transform.localScale;
currentScale.x = Mathf.Abs(currentScale.x) * dir;
transform.localScale = currentScale;

dir reprent 1 or -1