Fix violation from the google chrome console, Angular 18

Discussão em 'Angular' iniciado por Anna Do, Março 7, 2025.

  1. Anna Do

    Anna Do Guest

    I need to use only a number type in the input, Angular 18. If I try to use

    <input matInput type="number">


    in google chrome I get a violation

    [Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive.


    How to remove this violation and continue to use number in this input?

    Adding event listeners via ViewChild didn't help. Using [attr.type]="'number'" returns a string instead of number.

    Continue reading...

Compartilhe esta Página