From f7c6c6f7070e3952fdd58271c8a09947b23990c9 Mon Sep 17 00:00:00 2001 From: TheDiaval Date: Thu, 5 Mar 2020 15:57:09 +0300 Subject: [PATCH] docs(angular): use better examples --- docs/en/Angular/Localization/Index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/Angular/Localization/Index.md b/docs/en/Angular/Localization/Index.md index cb94f2727b..ea6e9b7ea0 100644 --- a/docs/en/Angular/Localization/Index.md +++ b/docs/en/Angular/Localization/Index.md @@ -85,16 +85,16 @@ After that, you are able to use localization service. > You can add interpolation parameters as arguments to `instant()` and `get()` methods. ```ts -this.localizationService.instant('AbpIdentity::UserDeletionConfirmation', 'UserName'); +this.localizationService.instant('AbpIdentity::UserDeletionConfirmation', 'John'); // with fallback value this.localizationService.instant( { key: 'AbpIdentity::UserDeletionConfirmation', defaultValue: 'Default Value' }, - 'UserName', + 'John', ); // Output -// User 'UserName' will be deleted. Do you confirm that? +// User 'John' will be deleted. Do you confirm that? ``` To get a localized text as [_Observable_](https://rxjs.dev/guide/observable) use `get` method instead of `instant`: @@ -126,10 +126,10 @@ this.store.selectSnapshot(ConfigState.getLocalization('ResourceName::Key')); this.store.selectSnapshot( ConfigState.getLocalization( { - key: 'ResourceName::Key', + key: 'AbpIdentity::UserDeletionConfirmation', defaultValue: 'Default Value', }, - ...interpolationParameters, + 'John', ), ); ```