ASP.NET Core MVC / Razor Pages UI: JavaScript Setting API

Localization API allows you to get the values of the settings on the client side. You can read the current value of a setting in the client side only if it is allowed by the setting definition (on the server side).

This document only explains the JavaScript API. See the settings document to understand the ABP setting system.

Basic Usage

//Gets a value as string.
var language = abp.setting.get('Abp.Localization.DefaultLanguage');

//Gets an integer value.
var requiredLength = abp.setting.getInt('Abp.Identity.Password.RequiredLength');

//Gets a boolean value.
var requireDigit = abp.setting.getBoolean('Abp.Identity.Password.RequireDigit');
JavaScript

All Values

abp.setting.values can be used to obtain all the setting values as an object where the object properties are setting names and property values are the setting values.

An example value of this object is shown below:

{
  Abp.Localization.DefaultLanguage: "en",
  Abp.Timing.TimeZone: "UTC",
  ...
}
JavaScript

Contributors


Last updated: October 11, 2020 Edit this page on GitHub

Was this page helpful?

Please make a selection.

To help us improve, please share your reason for the negative feedback in the field below.

Please enter a note.

Thank you for your valuable feedback!

Please note that although we cannot respond to feedback, our team will use your comments to improve the experience.

Community Talks

Real World Problems and Solutions with AI

27 Feb, 17:00
Online
Watch the Event
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
Do you need assistance from an ABP expert?
Schedule a Meeting
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book