step 1 - convert al lcomponents, directives and pipes to standalone

see https://v17.angular.io/guide/standalone-migration
I executed:
ng g @angular/core:standalone
and selected "Convert all components, directives and pipes to standalone"
This commit is contained in:
2024-10-13 09:55:07 +02:00
parent 526e1d842e
commit 08a481b5ba
44 changed files with 315 additions and 162 deletions

View File

@@ -5,12 +5,13 @@ import {
Input,
Output,
} from "@angular/core";
import {
ControlValueAccessor,
FormControl,
NG_VALUE_ACCESSOR,
Validators,
} from "@angular/forms";
import { ControlValueAccessor, FormControl, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule } from "@angular/forms";
import { MatButton } from "@angular/material/button";
import { MatTooltip } from "@angular/material/tooltip";
import { CdkOverlayOrigin, CdkConnectedOverlay } from "@angular/cdk/overlay";
import { MatTabGroup, MatTab } from "@angular/material/tabs";
import { MatFormField, MatLabel } from "@angular/material/form-field";
import { MatInput } from "@angular/material/input";
export type DateType = "QUICK" | "RELATIVE" | "ABSOLUTE";
@@ -27,15 +28,29 @@ export class DatePickerChange {
}
@Component({
selector: "app-date-picker",
templateUrl: "./date-picker.component.html",
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DatePickerComponent),
multi: true,
},
],
selector: "app-date-picker",
templateUrl: "./date-picker.component.html",
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => DatePickerComponent),
multi: true,
},
],
standalone: true,
imports: [
MatButton,
MatTooltip,
CdkOverlayOrigin,
CdkConnectedOverlay,
MatTabGroup,
MatTab,
MatFormField,
MatLabel,
MatInput,
FormsModule,
ReactiveFormsModule,
],
})
export class DatePickerComponent implements ControlValueAccessor {
isOpen = false;