form-sandbox.component.ts
angular/examples/week03-04/src/app/examples/form-sandbox.component.ts
// @ts-nocheck
import { Component } from '@angular/core';
import { HighlightDirective } from '../shared/highlight.directive';
import { IfViewportDirective } from '../shared/if-viewport.directive';
import { RegistrationFormComponent } from './registration-form.component';
@Component({
selector: 'app-form-sandbox',
standalone: true,
imports: [HighlightDirective, IfViewportDirective, RegistrationFormComponent],
template: `
<section class="layout">
<aside appHighlight="#dbeafe" appHighlightHoverColor="#bfdbfe">
<h2>Directive Playground</h2>
<p>
Resize the browser to see the callout toggle with the viewport structural directive.
</p>
<div *appIfViewport="960" class="callout">
Visible at ≥ 960px. Use structural directives to control complex layouts.
</div>
</aside>
<main>
<app-registration-form></app-registration-form>
</main>
</section>
`,
styles: [
`
.layout {
display: grid;
gap: 2rem;
grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
align-items: start;
}
aside {
padding: 1.5rem;
border-radius: 1rem;
}
.callout {
margin-top: 1rem;
padding: 1rem;
border-radius: 0.75rem;
background: #ecfccb;
color: #365314;
}
`,
],
})
export class FormSandboxComponent {}
관련 글
server.js
server.js — javascript source code from the angular learning materials (angular/comprehensive-demo/server/server.js).
글 읽기 →app.component.ts
app.component.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.component.ts).
글 읽기 →app.config.ts
app.config.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.config.ts).
글 읽기 →app.routes.ts
app.routes.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/app.routes.ts).
글 읽기 →auth.guard.ts
auth.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/auth.guard.ts).
글 읽기 →role.guard.ts
role.guard.ts — typescript source code from the angular learning materials (angular/comprehensive-demo/src/app/core/guards/role.guard.ts).
글 읽기 →