Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F87391493
toggle-navigation.component.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Oct 12, 10:12
Size
1 KB
Mime Type
text/x-java
Expires
Mon, Oct 14, 10:12 (2 d)
Engine
blob
Format
Raw Data
Handle
21589708
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
toggle-navigation.component.ts
View Options
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { TLN_SEARCH_ROUTE, TLN_FULLSCREEN_PARAM, TLN_NAV_BAR_OPEN_STATE_PARAM} from '../constants';
import { Mapping } from '../route-reader';
import { RouteUpdater } from '../route-updater';
@Component({
selector: 'toggle-navigation',
templateUrl: './toggle-navigation.component.html',
styleUrls: ['./toggle-navigation.component.css']
})
export class ToggleNavigationComponent extends RouteUpdater {
fullscreen: boolean = false;
navBarOpenState: boolean = false;
protected mapping: Mapping = {
navBarOpenState: { param: TLN_NAV_BAR_OPEN_STATE_PARAM, type: "boolean" },
fullscreen: { param: TLN_FULLSCREEN_PARAM, type: "boolean" }
}
constructor(protected router: Router, protected activatedRoute: ActivatedRoute ) {
super(router, activatedRoute);
}
private toggleFullscreen(){
this.fullscreen = !this.fullscreen;
this.updateParams();
}
toggleNavDrawer(){
this.navBarOpenState = !this.navBarOpenState;
this.updateParams();
}
}
Event Timeline
Log In to Comment