mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
* feat: create challenge 52 on lazy load component Initial boilerplate from `nx g @angular-challenges/cli:challenge` * feat: revert to NgModule Copy of 31 * feat: initial version of starting point * feat: add documentation * feat: pr tweaks Add author file Remove thomas from the contributor list Add a more direct hint * feat: pr tweaks Update "Go to the latest Challenge" link
23 lines
480 B
TypeScript
23 lines
480 B
TypeScript
import { Component, signal } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-root',
|
|
template: `
|
|
<div class="h-screen bg-gray-500">
|
|
@if (topLoaded()) {
|
|
<app-top />
|
|
} @else {
|
|
<app-placeholder />
|
|
<button
|
|
class="rounded-sm border border-blue-500 bg-blue-300 p-2"
|
|
(click)="topLoaded.set(true)">
|
|
Load Top
|
|
</button>
|
|
}
|
|
</div>
|
|
`,
|
|
})
|
|
export class AppComponent {
|
|
topLoaded = signal(false);
|
|
}
|