Files
FarmMapsLib/projects/common/src/fm/components/app-menu/app-menu.component.ts
Peter Bastiani 9cc581dd3d
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
AW-6526 update angular 21
2026-01-19 12:19:09 +01:00

37 lines
870 B
TypeScript

import { Component, Input, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import * as appActions from '../../actions/app-common.actions';
import { IUser } from '../../models/user';
import * as appReducers from '../../reducers/app-common.reducer';
@Component({
selector: 'fm-app-menu',
templateUrl: './app-menu.component.html',
styleUrls: ['./app-menu.component.scss'],
standalone: false
})
export class AppMenuComponent implements OnInit {
@Input() user:IUser;
@Input() showMenu:boolean;
public noContent = true;
constructor(private store: Store<appReducers.State>) { }
ngOnInit(): void {
}
toggle(event:MouseEvent) {
event.stopPropagation();
this.store.dispatch(new appActions.ToggleAppMenu());
}
activateRoute() {
this.noContent=false;
}
deActivateRoute() {
this.noContent=true;
}
}