I am testing the HTML5 drag and drop with the Angular application. Just wondering what is wrong here. I have the below code in the app.component.html file.
<div>
<p draggable="true" ondragstart="drag(event)">Coffee</p>
</div>
And I have this in the Typescript file app.component.ts
export class AppComponent {
function drag(ev) {
console.log(ev);
}
}
It says reference error in the console of the browser. Why is it not outputting anything on the console? Please advise!