From 977db7889f3a4cc0b847161f59a5e28a3ffcbfeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Fri, 16 Oct 2020 22:56:38 +0300 Subject: [PATCH] documented ASP.NET Core MVC / Razor Pages UI: JavaScript Features API --- docs/en/UI/AspNetCore/JavaScript-API/Features.md | 15 +++++++++++++++ docs/en/UI/AspNetCore/JavaScript-API/Index.md | 2 +- docs/en/docs-nav.json | 4 ++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 docs/en/UI/AspNetCore/JavaScript-API/Features.md diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Features.md b/docs/en/UI/AspNetCore/JavaScript-API/Features.md new file mode 100644 index 0000000000..e3cd2be445 --- /dev/null +++ b/docs/en/UI/AspNetCore/JavaScript-API/Features.md @@ -0,0 +1,15 @@ +# ASP.NET Core MVC / Razor Pages UI: JavaScript Features API + +`abp.features` API allows you to check features or get the values of the features on the client side. You can read the current value of a feature in the client side only if it is allowed by the feature definition (on the server side). + +> This document only explains the JavaScript API. See the [Features](../../../Features.md) document to understand the ABP Features system. + +## Basic Usage + +`abp.features.values` can be used to access to the all feature values. + +````js +var excelExportFeatureValue = abp.features.values["ExportingToExcel"]; +```` + +Then you can check the value of the feature to perform your logic. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index ac96f09eaf..2ce185c6e3 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -9,7 +9,7 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.currentUser](CurrentUser.md) * [abp.dom](DOM.md) * [abp.event](Events.md) -* abp.features +* [abp.features](Features.md) * [abp.localization](Localization.md) * abp.log * [abp.message](Message.md) diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 944639cf33..bdb99396e0 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -467,6 +467,10 @@ "text": "Settings", "path": "UI/AspNetCore/JavaScript-API/Settings.md" }, + { + "text": "Features", + "path": "UI/AspNetCore/JavaScript-API/Features.md" + }, { "text": "AJAX", "path": "UI/AspNetCore/JavaScript-API/Ajax.md"