> For the complete documentation index, see [llms.txt](https://docs.gapvelocity.ai/webmap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gapvelocity.ai/webmap/winforms/extend-or-modify-the-converted-application/override-frontend-methods.md).

# Override FrontEnd methods

If you want to change the way a method works you can just use the same name as the parent, in case it is from inheritance.

Example:

**FormComponent.ts**

```typescript
@Component({
  template: ''
})
export class FormComponent extends ControlComponent {
    myMethod(): string {
        return "FormComponent";
    }
}
```

**MyComponent.ts**

```typescript
@Component({
   selector : "hello-world",
   styleUrls : ["./component.css"],
   templateUrl : "./component.html",
})
export class MyComponent extends FormComponent {
   myMethod(): string {
        return "MyComponent";
    }
}
```

In this case the **myMethod()** call will return "**MyComponent**".

We can also override components' native methods from our component, just access the component using the [<mark style="color:red;">ViewChild approach</mark>](/webmap/winforms/extend-or-modify-the-converted-application/access-frontend-components.md) and update the method you want.

```typescript
@ViewChild("button1")
button1: ButtonComponent;

ngAfterViewInit(): void {
  this.overrideButtonClick();
}

overrideButtonClick(): void {
  this.button1.click = (event: any) => {
    // new click logic
  }
}
```

Some of the native methods make calls to the [<mark style="color:red;">server</mark>](/webmap/general/frontend/documentation/winforms-angular-components/decorators/server-event.md), if you override them you will probably lose that functionality and other original behaviors, make sure to do it if strictly necessary and make sure to be adding the correct logic.
