At your component you will have to have this import:
import { ActivatedRoute } from '@angular/router';
Loop the import in at the constructor's signature like so:
public whereAmi: ActivatedRoute
Use it like this:
isToDisplayCompanyDropdown():boolean{
if(this.whereAmi.snapshot.firstChild.url[0].path == 'generic-gunk'){
return false;
}
return true;
}
As you might imagine you could use isToDisplayCompanyDropdown() in the template in an *ngIf inline in an ng-container wrapping a dropdown list of companies.
No comments:
Post a Comment