Can’t bind to ‘ngIf’ since it isn’t a known property of ‘div’.
The element is <div [ngIf]="isAuth" id="sidebar">
And the component is:
import SessionService from '../session/session.service';
import { Component } from '@angular/core';
@Component({
providers: [],
selector: 'navbar-left',
styles: [require('./navbar-left.scss')],
template: require('./navbar-left.html'),
})
export default class NavbarLeftComponent {
public isAuth: boolean = false;
constructor(private sessionService: SessionService) {
this.isAuth = sessionService.sessionIsAuth();
}
}
Not sure what exactly I’m doing wrong? This is a child component. In the parent component aka App component the ngIf
works fine.
Angular RC5