Can’t construct a query for the property, since the query selector wasn’t defined

It’s because of a circular dependency between SidenavComponent and SidenavNavComponent. It can be resolved using forwardRef. Don’t forget to import it as well:

import { forwardRef } from '@angular/core';

@ViewChild(forwardRef(() => SidenavNavComponent))
private navComponent: SidenavNavComponent;

Plunker example

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)