Skip to content

Commit

Permalink
chore(demo): configure the top offset used when scrolling to an anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Jul 22, 2024
1 parent 34f2654 commit 6d1d33d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions projects/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {ViewportScroller} from '@angular/common';
import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
import {RouterLink} from '@angular/router';
Expand Down Expand Up @@ -48,4 +49,8 @@ import {debounceTime, map, startWith} from 'rxjs';
})
export class App {
protected readonly stackblitzStarterPath = `/${DemoPath.Stackblitz}`;

constructor() {
inject(ViewportScroller).setOffset([0, 64]);
}
}

0 comments on commit 6d1d33d

Please sign in to comment.