-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathhome.component.ts
More file actions
29 lines (28 loc) · 881 Bytes
/
home.component.ts
File metadata and controls
29 lines (28 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import { Component, Output } from '@angular/core';
import { RouterLink, RouterLinkActive } from '@angular/router';
import { NavButtonComponent } from './nav-button.component';
@Component({
standalone: true,
imports: [NavButtonComponent, RouterLink, RouterLinkActive],
selector: 'app-home',
template: `
<nav-button [links]="'/foo'" class="fixed left-1/2 top-3">
Foo Page
</nav-button>
<div id="top" class="h-screen snap-start bg-gray-500">
Empty
<nav-button [links]="homePath" [fragment]="'bottom'">
Scroll Bottom
</nav-button>
</div>
<div id="bottom" class="h-screen snap-start bg-blue-300">
I want to scroll each
<nav-button [links]="homePath" [fragment]="'top'">Scroll Top</nav-button>
</div>
`,
})
export class HomeComponent {
@Output() links = '.';
@Output() fragment = '';
homePath = '.';
}