This file contains hidden or 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
| "build": { | |
| ... | |
| "configurations": { | |
| ... | |
| "fr": { | |
| "aot": true, | |
| "outputPath": "dist/my-project-fr/", | |
| "i18nFile": "src/locale/messages.fr.xlf", | |
| "i18nFormat": "xlf", | |
| "i18nLocale": "fr", |
This file contains hidden or 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
| <trans-unit id="972cb0cf3e442f7b1c00d7dab168ac08d6bdf20c" datatype="html"> | |
| <source>Updated: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/></source> | |
| <target>Mis à jour: <x id="ICU" equiv-text="{minutes, plural, =0 {...} =1 {...} other {...}}"/></target> | |
| </trans-unit> | |
| <trans-unit id="7151c2e67748b726f0864fc443861d45df21d706" datatype="html"> | |
| <source>{VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other {<x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} }</source> | |
| <target>{VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a <x id="INTERPOLATION" equiv-text="{{minutes}}"/> minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} }</target> | |
| </trans-unit> |
This file contains hidden or 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
| <trans-unit id="f99f34ac9bd4606345071bd813858dec29f3b7d1" datatype="html"> | |
| <source>The author is <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></source> | |
| <target>L'auteur est <x id="ICU" equiv-text="{gender, select, male {...} female {...} other {...}}"/></target> | |
| </trans-unit> | |
| <trans-unit id="eff74b75ab7364b6fa888f1cbfae901aaaf02295" datatype="html"> | |
| <source>{VAR_SELECT, select, male {male} female {female} other {other} }</source> | |
| <target>{VAR_SELECT, select, male {un homme} female {une femme} other {autre} }</target> | |
| </trans-unit> |
This file contains hidden or 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
| ngOnInit() { | |
| this.myForm = this.fb.group({ | |
| name: ['', Validators.required], | |
| email: [ | |
| '', | |
| [Validators.required, Validators.email], | |
| ValidateEmailNotTaken.createValidator(this.signupService), | |
| {updateOn: 'blur'} | |
| ] | |
| }); |
This file contains hidden or 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 [formGroup]="myForm"> | |
| <input type="text" formControlName="name"> | |
| <input type="email" formControlName="email"> | |
| <!-- Other related errors go here--> | |
| <div *ngIf="myForm.get('email').errors && myForm.get('email').errors.emailUnavailable"> | |
| This email is already taken. | |
| </div> | |
| </form> |
This file contains hidden or 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
| ngOnInit() { | |
| this.myForm = this.fb.group({ | |
| name: ['', Validators.required], | |
| email: [ | |
| '', | |
| [Validators.required, Validators.email], | |
| ValidateEmailNotTaken.createValidator(this.signupService) | |
| ] | |
| }); | |
| } |
This file contains hidden or 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
| constructor(private fb: FormBuilder, | |
| private loanAmountValidatorService: LoanAmountValidatorService) { } | |
| ngOnInit() { | |
| this.newsletterForm = this.fb.group({ | |
| email: ['', [Validators.required, Validators.email]], | |
| }, {validators: this.loanAmountValidatorService.loanAmountValidator}); | |
| } |
This file contains hidden or 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 { Directive } from '@angular/core'; | |
| import { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator } from '@angular/forms'; | |
| import { LoanAmountValidatorService } from './loan-amount-validator.service'; | |
| @Directive({ | |
| selector: '[razrooLoanAmount]', | |
| providers: [{ provide: NG_VALIDATORS, useExisting: LoanAmountDirective, multi: true }] | |
| }) | |
| export class LoanAmountDirective implements Validator { | |
| constructor(private loanAmountValidatorService: LoanAmountValidatorService) {} |
This file contains hidden or 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 { Injectable } from '@angular/core'; | |
| import { FormGroup, ValidationErrors, ValidatorFn } from '@angular/forms'; | |
| @Injectable({ | |
| providedIn: 'root' | |
| }) | |
| export class LoanAmountValidatorService { | |
| constructor() { } |