There is also another way how to pass data from template to component



cockpit.component.html

<input type="text" #serverNameInput />
<button (click)="onAddServer(serverNameInput)">Add server</button>