angaularJs directive prototype