Faça o botão desativado se a entrada estiver vazia angular
<button type="submit" [disabled]="!name || !email" class="btn btn-default" (click)="getValues($event, name, email)">Add Data</button>
Prickly Plover