I\'ve set up a fiddle with a table.
You see, Im trying to make a table where the user will hover and click the td to show an id. Check the fiddle out and you\'ll und
Just wanted to add two ways that actually worked inside the for me:
Using Angular 5:
a. in [yourname].component.html:
my cell ...
b. In [yourname].component.ts: (inside your exported class.. )
simply implement the needed function..
export class [youyname].... {
....
myClick() {
}
}
Pure JS:
Yo.. ....
The easiest way..
(Note: It's possible to put the script inside the tag, or even load an external JS file inside it, but I don't like doing it like that.)
- 热议问题