AW-6526 update angular 21
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit

This commit is contained in:
2026-01-19 12:19:09 +01:00
parent c35114b2d3
commit 9cc581dd3d
102 changed files with 3287 additions and 4023 deletions

View File

@@ -1,22 +1,22 @@
import { Component, OnInit, OnDestroy, OnChanges, Input, SimpleChanges } from '@angular/core';
import { Component, Input, OnChanges, OnDestroy, OnInit, inject } from '@angular/core';
import { Feature } from 'ol';
import { SourceVectorComponent } from './sources/vector.component';
@Component({
selector: 'aol-feature',
template: ` <ng-content></ng-content> `,
standalone: false
selector: 'aol-feature',
template: ` <ng-content></ng-content> `,
standalone: true,
})
export class FeatureComponent implements OnInit, OnDestroy, OnChanges {
private host = inject(SourceVectorComponent);
@Input()
id: string | number | undefined;
public componentType = 'feature';
public instance: Feature;
componentType = 'feature';
instance: Feature;
constructor(private host: SourceVectorComponent) {}
ngOnInit() {
ngOnInit(): void {
this.instance = new Feature();
if (this.id !== undefined) {
this.instance.setId(this.id);
@@ -24,11 +24,11 @@ export class FeatureComponent implements OnInit, OnDestroy, OnChanges {
this.host.instance.addFeature(this.instance);
}
ngOnDestroy() {
ngOnDestroy(): void {
this.host.instance.removeFeature(this.instance);
}
ngOnChanges(changes: SimpleChanges) {
ngOnChanges(): void {
if (this.instance) {
this.instance.setId(this.id);
}