When I'm trying to use mat tree's nestedControl's expandAll method it generates this error. How can I fix this? I will appreciate any help.
error
Code