Search bar directive using templateUrl and accessing scope