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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user