Is it possible to utilize the content of a ts
variable in a js
file? I find myself at a loss realizing I am unsure of how to achieve this.
Please provide any simple implementation suggestions if available.
In my ts file, there is a printedOption
that I wish to use in my js
file. This variable contains the value of my select input.
validateLuggages() {
this.printedOption = this.selectedOption;
this.http.get(`/routes/luggages`)
.subscribe((data) => {
this.parsedForLuggages = data;
})
return this.printedOption;
}
So, how do I instantiate and utilize this variable in my JS
file?