Base solution for your next web application
Open Closed

Changing user setting on client side #5365


User avatar
0
Ricavir created

Hi,

Is it possible to change a user setting on client side without refreshing client angular page ?

The use case is :

  • user saves an entity by calling a server appservice
  • this appservice change a user setting "setting-A" on server side
  • if user navigates to other pages on client side AND angular application tries to read user setting "setting-A", then "setting-A" will not reflect last value stored on server side.

Is there a way to change this user setting on client side without refreshing ? If no, is there another alternative instead of having to create a dedicated appservice ?


2 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    You can call this:

    function getUserConfigurationSetting() {
        return abp.ajax({
            url: AppConsts.remoteServiceBaseUrl + '/AbpUserConfiguration/GetAll',
            method: 'GET',
            headers: { 'Authorization': 'Bearer ' + abp.auth.getToken() }
        }).done(result => {
            $.extend(true, abp.setting, result.setting);
        });
    }
    
  • User Avatar
    0
    Ricavir created

    Tks, it works ! I just need to be careful because all settings are received from server even if only just one setting has been changed.