How to execute javascript code like JSON.parse() in the angular html template itself instead of making a method and calling the method in the angular html template file
I tried below ways:
<p [innerHTML]="JSON.parse(['\\u2013'])[0]"></p>
<p>{{ JSON.parse(['\\u2013'])[0] }}</p>
But getting Property 'JSON' does not exist on type 'AppComponent'.
Can it be possible to write javascript code on angular html template itself?