[Angular] Why create local variables in templates?
Joel Lau
Posted on May 17, 2020
I'm a newbie trying to pick up some angular when I came across this strange bit of code.
<video #movieplayer ...>
<button (click)="movieplayer.play()">
</video>
When / why would I create a local variable (movieplayer
) in the .html file rather than its .ts?
đ đȘ đ
đ©
Joel Lau
Posted on May 17, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.