how to make smooth rotation transition - not make the angles jump.

function Update () {
GetAngle(GetInput());
}

var angle = Vector3.zero;
function GetInput(){
	var x = Input.GetAxis("Horizontal");
	var y = Input.GetAxis("Vertical");
	angle = Vector3(y, x, 0);
	return angle;
}

function GetAngle(input:Vector3){ //local rotation
	transform.localEulerAngles = input * 180;
}

In this example. I press left arrow and the object rotates left,
if I press the right arrow immediately, the object’s rotation jumps suddenly to vector.zero, before it starts rotating right as it should.

How to make a smooth transition?

Use a Slerp function in Update. http://unity3d.com/support/documentation/ScriptReference/Quaternion.Slerp.html
http://unity3d.com/support/documentation/ScriptReference/Vector3.Slerp.html