You are data binding to a variable in your component called name
via ngModel, and then passing the same variable back to the component from the template/UI as an argument to the method resetFields(name: any)
<input [(ngModel)]="name" (focus)="resetFields(name)">
Because you are passing a "copy" of name from the teamplate/UI as an argument to your method resetFields, it is in fact modifying that copy of name, but it does not alter the original that ngModel is using... and because you never do anything with the argument after you modify it... it does not work.
resetFields(name: any) {
console.log(name);
name = null;
console.log(name);
}
This is why modifying the component variable works as you are modifiying the original copy that ngModel is data binding to.
resetFields() {
this.name = null;
}