Це відео не доступне.
Перепрошуємо.

Impure Pipes in Angular | Angular Pipes | Angular 13+

Поділитися
Вставка
  • Опубліковано 18 сер 2024
  • Whenever we create a new pipe in Angular that pipe is a pure pipe. We can also set the pipe as pure or impure explicitely by setting pure property of pipe decorator to true or false respectively.
    Angular executes a pure pipe only when it detects a pure change to the input value. A pure change is either
    - a change to a primitive input value (String, Number, Boolean) or
    - a changed object reference (Array, Date, Object)
    A pure pipe is not executed if the input to the pipe is a reference type like object and only the property values of the object has change but not the reference.
    So pure pipes are fast, but using them for filtering data is not a good idea because, the filtering may not work as expected if the source data is updated without a change to the object reference.
    The impure pipes are those pipes which are executed for every change detection cycle even if there is no change in the source data. Due to this impure pipes are very costly performance wise and should avoid using impure pipes
    Let's understand impure pipe with some examples in this lecture.
    DOWNLOAD SECTION SOURCE CODE HERE: drive.google.c...

КОМЕНТАРІ • 2