mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 13:53:03 -05:00
feat(anchorscrolling): new challenge
This commit is contained in:
19
apps/anchor-scrolling/src/app/app.component.ts
Normal file
19
apps/anchor-scrolling/src/app/app.component.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { AnchorButtonComponent } from './anchor-button.component';
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
imports: [AnchorButtonComponent],
|
||||
selector: 'app-root',
|
||||
template: `
|
||||
<div id="top" class="h-screen bg-gray-500">
|
||||
Empty
|
||||
<anchor-button href="#bottom">Scroll Bottom</anchor-button>
|
||||
</div>
|
||||
<div id="bottom" class="h-screen bg-blue-300">
|
||||
I want to scroll each
|
||||
<anchor-button href="#top">Scroll Top</anchor-button>
|
||||
</div>
|
||||
`,
|
||||
})
|
||||
export class AppComponent {}
|
||||
Reference in New Issue
Block a user