Question: I'm trying to pass the click text into a variable on a click event. Here's the code I have at the moment:

```
<th (click)="sortedColumn = clickValue">Ask Price</th>

```

So, when a user clicks on the table header, I'd like for it to store the table header value "Ask Price" in the `sortedColumn` variable.

Answer: 
You can try two options:

* using template reference variable

```
<th (click)="sortedColumn = ref.textContent" #ref>Ask Price</th>
                                             ^^^^

```
* using `$event`

```
<th (click)="sortedColumn = $any($event.target).textContent">Ask Price</th>

```
I can't comment yet but as an appendix to the answer above:

I would also pass the value to a function defined in your .ts Component and assign the value there to the property.

html:

`<th (click)="onClickHeader($any($event.target).textContent)">Ask Price</th>`

ts:

`public onClickHeader(value: string): void { this.sortedColumn = value; }`