diff --git a/docs/en/UI/Angular/Current-User.md b/docs/en/UI/Angular/Current-User.md new file mode 100644 index 0000000000..820a787b5c --- /dev/null +++ b/docs/en/UI/Angular/Current-User.md @@ -0,0 +1,20 @@ +# Angular UI: Current User + +The current user information stored in Config State. + +### How to Get a Current User Information Configuration + +You can use the `getOne` or `getOne$` method of `ConfigStateService` to get a specific configuration property. For that, the property name should be passed to the method as parameter. + +```js +// this.config is an instance of ConfigStateService + +const currentUser = this.config.getOne("currentUser"); + +// or +this.config.getOne$("currentUser").subscribe(currentUser => { + // use currentUser here +}) +``` + +> See the [ConfigStateService](./Config-State-Service) for more information. diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index f764ca0bf2..b919955c6e 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -981,6 +981,10 @@ "text": "Authorization", "path": "UI/Angular/Authorization.md" }, + { + "text": "Current User", + "path": "UI/Angular/Current-User.md" + }, { "text": "HTTP Requests", "path": "UI/Angular/HTTP-Requests.md" diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs index 492e938874..65212fe69f 100644 --- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs +++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs @@ -113,8 +113,11 @@ public class BundlingService : IBundlingService, ITransientDependency var contributor = CreateContributorInstance(bundleDefinition.BundleContributorType); contributor.AddScripts(scriptContext); } + + scriptContext.BundleDefinitions.AddIfNotContains( + x => x.Source == "_framework/blazor.webassembly.js", + () => new BundleDefinition { Source = "_framework/blazor.webassembly.js" }); - scriptContext.Add("_framework/blazor.webassembly.js"); return scriptContext; } @@ -206,7 +209,7 @@ public class BundlingService : IBundlingService, ITransientDependency builder.Append($" ");