// --- // PUBLIC METHODS. // --- // I get called once when the component is being unmounted. public ngOnDestroy() : void { // When we close the modal window, we can allow any overflow of the HTML page to // show; this will re-enable the natural scrollbars on the main page. this.domUtils.showHtmlOverflow(); }
// I get called once when the component it about to be mounted. public ngOnInit() : void { // When we open a modal window, it will have it's own scrollbar. In order to not // show two scrollbars doubled-up on the side of the screen, we have to make sure // that the HTML page doesn't show a scrollbar for the main body. this.domUtils.hideHtmlOverflow(); }
public ngOnDestroy() : void { // When we close the inbox outlet, we can allow any overflow of the HTML page to // show; this will re-enable the natural scrollbars on the main page. this.domUtils.showHtmlOverflow(); ( this.unlisten ) && this.unlisten(); }
// --- // PUBLIE METHODS. // --- // I get called once when the component is being unmounted. public ngOnDestroy() : void { ( this.paramMapSubscription ) && this.paramMapSubscription.unsubscribe(); ( this.unlisten ) && this.unlisten(); // When we close the item-view (pseudo modal window), we can allow any overflow // of the HTML page to show; this will re-enable the natural scrollbars on the // main page. this.domUtils.showHtmlOverflow(); }
// I get called once when the component is being mounted. public ngOnInit() : void { // Since the item-view is acting like a pseudo modal window, we want to hide the // scrollbars of the main document. This way, scrolling in the detail view won't // cause accidental scrolling in the main document. this.domUtils.hideHtmlOverflow(); this.paramMapSubscription = this.activatedRoute.paramMap // TIMING HACK: We need to add a tick-delay between the root ParamMap emit // and the callback in order to fix several Angular bugs. .pipe( delay( 10 ) ) .subscribe( ( paramMap: ParamMap ) : void => { this.loadData( +paramMap.get( "id" ) ); } ) ; this.unlisten = this.keyboardShortcuts.listen( { "Escape": ( event: KeyboardEvent ) : void => { this.router.navigate( [ "../../" ], { relativeTo: this.activatedRoute } ); }, "ArrowLeft": ( event: KeyboardEvent ) : void => { this.detailViewComponent.gotoRelativeItem( "previous", +this.activatedRoute.snapshot.params.id ); }, "ArrowRight": ( event: KeyboardEvent ) : void => { this.detailViewComponent.gotoRelativeItem( "next", +this.activatedRoute.snapshot.params.id ); } }, { priority: this.keyboardShortcuts.getPriority( "board-item" ) } ); }
public ngOnInit() : void { // When we open a inbox outlet, it will have it's own scrollbar. In order to not // show two scrollbars doubled-up on the side of the screen, we have to make sure // that the HTML page doesn't show a scrollbar for the main body. this.domUtils.hideHtmlOverflow(); this.unlisten = this.keyboardShortcuts.listen( { "Escape": ( event: KeyboardEvent ) : void => { this.closeInbox(); } }, { priority: this.keyboardShortcuts.getPriority( "inbox" ) } ); this.loadData(); }