docs: use lighter lodash isEqual import in equality example

(cherry picked from commit 7d483f28a4)
This commit is contained in:
guidettj 2026-03-12 17:12:09 +01:00 committed by Matthew Beck
parent f39896da99
commit de5fbb7deb

View file

@ -237,9 +237,9 @@ When you read a signal within an `OnPush` component's template, Angular tracks t
When creating a signal, you can optionally provide an equality function, which will be used to check whether the new value is actually different than the previous one.
```ts
import _ from 'lodash';
import isEqual from 'lodash/isEqual';
const data = signal(['test'], {equal: _.isEqual});
const data = signal(['test'], {equal: isEqual});
// Even though this is a different array instance, the deep equality
// function will consider the values to be equal, and the signal won't