I am exporting a component that has 2 variables, and 2 functions to change those variables (which are booleans).
Now when I trigger my function with (click) I get the error:
ORIGINAL EXCEPTION: ReferenceError: landing is not defined
but If I define landing and portfolio as variables ie var landing = true;
I can't evaluate them with *ngIf
This is the export of my component:
export class NavigationComponent {
landing = false;
portfolio = true;
changeMiniNavLanding = function() {
landing = true;
portfolio = false;
}
changeMiniNavPortfolio = function() {
landing = false;
portfolio = true;
}
}
I am new to typescript and Angular2 and have no idea what I'm doing wrong. In Angular1 I'd just acces them with $scope.