input directive using link function