replace element from template file using directive