This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ElementRef, ViewChild, effect } from '@angular/core'; | |
import { IMsg, ShareDataService } from '../share-data.service'; | |
@Component({ | |
selector: 'test2', | |
standalone: true, | |
imports: [], | |
templateUrl: './test2.component.html', | |
styleUrl: './test2.component.scss' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { RouterOutlet } from '@angular/router'; | |
import { Test1Component } from './test1/test1.component'; | |
import { Test2Component } from './test2/test2.component'; | |
@Component({ | |
selector: 'app-root', | |
standalone: true, | |
imports: [RouterOutlet, Test1Component, Test2Component], | |
templateUrl: './app.component.html', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.tcenter { | |
text-align: center; | |
} | |
.my-container { | |
display: flex; | |
flex-direction: column; | |
align-items: center; | |
border-radius: 8px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- <p>test1 works!</p> --> | |
<div class="my-container" (keydown)="onKeyEnter($event)"> | |
<br /> | |
<h2>This is the {{ compName }}</h2> | |
<input type="text" placeholder="Enter message" #input /> | |
<br /> | |
<button type="button" (click)="onClick(input.value)">Send</button> | |
<br /> | |
<div class="inner-row"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ElementRef, ViewChild, effect } from '@angular/core'; | |
import { IMsg, ShareDataService } from '../share-data.service'; | |
@Component({ | |
selector: 'test1', | |
standalone: true, | |
imports: [], | |
templateUrl: './test1.component.html', | |
styleUrl: './test1.component.scss' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form | |
class="q2container" | |
[formGroup]="dynFormGroup" | |
(ngSubmit)="onFormSubmit($event)" | |
> | |
<div *ngFor="let field of formFields"> | |
<div [ngSwitch]="field.controlType"> | |
<div *ngSwitchCase="'input'"> | |
<ng-template [ngIf]="field.inputType === 'radio'" [ngIfElse]="other"> | |
<label *ngFor="let option of field.options"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnDestroy, OnInit } from '@angular/core'; | |
import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; | |
import { ItemsFormFieldsService } from '../items-form-fields.service'; | |
import { Subscription } from 'rxjs'; | |
import { IFormField } from '../dataObjects/IFormField'; | |
@Component({ | |
selector: 'dyn-form', | |
templateUrl: './form.component.html', | |
styleUrls: ['./form.component.scss'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { FormBuilder, FormControl, FormGroup } from '@angular/forms'; | |
import { ItemsFormFieldsService } from '../items-form-fields.service'; | |
import { Subscription } from 'rxjs'; | |
@Component({ | |
selector: 'app-request-data', | |
templateUrl: './request-data.component.html', | |
styleUrls: ['./request-data.component.scss'] |
NewerOlder