angularjs directive with $watch function