index.htmlでは以下のように
functionを定義しているのですが
function testAlert(string){ alert(string); }
これを以下のようにangularのcomponent.htmlから呼び出せません
<div onClick="testAlert({{test}})">alert test</div>
呼び出せる方法などありましたら教えていただけたらと思います
補足
visual studio codeでは以下のようなエラーが出ています
[Angular] Binding to event property 'onClick' is disallowed for security reasons, please use (Click)=... If 'onClick' is a directive input, make sure the directive is imported by the current module. (property) test: any