re: How to Programmatically Trigger 'Click' Event in Angular 4 & 5 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Two things I'd like to point out: You should always use a button instead of a link if you just need to trigger an action Instead of the openFile...
 

Mine resulted to 'ERROR TypeError: Cannot read property 'click' of undefined'. Did I missed out something?

 

Hello, sadly i switched to Vue a long time ago so i may be a bit behind current Angular, but if you get that error it appears that you forgot to add to the input the reference attribute #photoInput.

Just tested it here and the code appears to be working as originally wrote:
stackblitz.com/edit/angular-playgr... ( checkout hello-framework/hello-framework.component.html )

code of conduct - report abuse