Problemas com Property/Event Binding
Eu tentei aplicar o código "<input type="text" [value] = "title" (keyup.enter) = "title =$event.target.value"/>", mas um erro SEMPRE ocorre...meu prompt de comando fica dizendo:
Object is possibly 'null'.
(keyup.enter) = "title =$event.target.value"/>
E também
Property 'value' does not exist on type 'EventTarget'.
(keyup.enter) = "title =$event.target.value"/>;
Eu segui as orientações da aula à risca, o que estou fazendo de errado? Por acaso preciso adicionar outras linhas de código ou tem outro addon que eu precise fazer o download?
@Renato-Afonso o angular agora é mais restrito em relação a isso. Tente o seguinte, isso vai checar por null: "title =$event?.target?.value"
Opa muito obrigado, vou tentar sim 😀👍
Em seg, 7 de dez de 2020 19:07, Loiane Groner [email protected] escreveu:
@Renato-Afonso https://github.com/Renato-Afonso o angular agora é mais restrito em relação a isso. Tente o seguinte, isso vai checar por null: "title =$event?.target?.value"
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/loiane/curso-angular/issues/94#issuecomment-740209316, or unsubscribe https://github.com/notifications/unsubscribe-auth/AR54VCLAZ3SN74X4W4U3GULSTVG3HANCNFSM4UGXBKBQ .
Na versão 12 isso não resolve. Tente o seguinte:
$any($event.target).value
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.