Upgrade to Angular 21
This commit is contained in:
@@ -3,7 +3,8 @@ import { Component, OnInit } from '@angular/core';
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
styleUrls: ['./app.component.scss'],
|
||||
standalone: false
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ import { IbanService } from '../../service/iban.service';
|
||||
@Component({
|
||||
selector: 'app-iban',
|
||||
templateUrl: './iban.component.html',
|
||||
styleUrls: ['./iban.component.scss']
|
||||
styleUrls: ['./iban.component.scss'],
|
||||
standalone: false
|
||||
})
|
||||
export class IbanComponent implements OnInit {
|
||||
public valueField: FormControl;
|
||||
@@ -68,7 +69,7 @@ export class IbanComponent implements OnInit {
|
||||
|
||||
if (this.valueField.valid) {
|
||||
var formattedValue: string;
|
||||
|
||||
|
||||
if (this.separators) {
|
||||
formattedValue = this.addSeparators(this.valueField.value);
|
||||
} else {
|
||||
|
||||
@@ -6,7 +6,8 @@ import { ClipboardService } from 'src/app/service/gui/clipboard.service';
|
||||
@Component({
|
||||
selector: 'app-nip',
|
||||
templateUrl: './nip.component.html',
|
||||
styleUrls: ['./nip.component.scss']
|
||||
styleUrls: ['./nip.component.scss'],
|
||||
standalone: false
|
||||
})
|
||||
export class NipComponent implements OnInit {
|
||||
public valueField: FormControl;
|
||||
|
||||
@@ -6,7 +6,8 @@ import { ClipboardService } from 'src/app/service/gui/clipboard.service';
|
||||
@Component({
|
||||
selector: 'app-pesel',
|
||||
templateUrl: './pesel.component.html',
|
||||
styleUrls: ['./pesel.component.scss']
|
||||
styleUrls: ['./pesel.component.scss'],
|
||||
standalone: false
|
||||
})
|
||||
export class PeselComponent implements OnInit {
|
||||
public valueField: FormControl;
|
||||
|
||||
@@ -6,11 +6,12 @@ import { ClipboardService } from 'src/app/service/gui/clipboard.service';
|
||||
@Component({
|
||||
selector: 'app-regon',
|
||||
templateUrl: './regon.component.html',
|
||||
styleUrls: ['./regon.component.scss']
|
||||
styleUrls: ['./regon.component.scss'],
|
||||
standalone: false
|
||||
})
|
||||
export class RegonComponent implements OnInit {
|
||||
public valueField: FormControl;
|
||||
|
||||
|
||||
constructor(private regonService: RegonService, private clipboardService: ClipboardService) {
|
||||
this.valueField = new FormControl('nip');
|
||||
this.valueField.setValidators([(control: AbstractControl) => this.regonService.validateRegon9(control.value)]);
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
@Pipe({ name: 'translate' })
|
||||
@Pipe({
|
||||
name: 'translate',
|
||||
standalone: false
|
||||
})
|
||||
export class TranslatePipe implements PipeTransform {
|
||||
private readonly translations: Map<string, string> = new Map([
|
||||
// wspólne
|
||||
@@ -29,4 +32,4 @@ export class TranslatePipe implements PipeTransform {
|
||||
|
||||
return translated;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user