ngxs-labs / data

NGXS Persistence API
https://ngxs-labs.github.io/data
81 stars 18 forks source link

Setting decode/encode globally does not work #538

Closed ishanuda closed 3 years ago

ishanuda commented 4 years ago

Hi, Setting the encoding globally does not encode with base64. However, adding to Persistence locally works fine.

Local Configuration - Successful

@Persistence([{
    decode: STORAGE_DECODE_TYPE.BASE64,
}])

Global Configuration - Not Successful

import {
  NGXS_DATA_STORAGE_PLUGIN,
  NGXS_DATA_STORAGE_DECODE_TYPE,
} from '@ngxs-labs/data/storage';
import { STORAGE_DECODE_TYPE } from '@ngxs-labs/data/typings';
providers: [
    { provide: NGXS_DATA_STORAGE_DECODE_TYPE, useValue: STORAGE_DECODE_TYPE.BASE64 }
]

Also, note that I could only find NGXS_DATA_STORAGE_DECODE_TYPE instead of NGXS_DATA_STORAGE_DECODE_TYPE_TOKEN

Typo Error

Is this a typo in the documentation?

MR

Thank you very much.

splincode commented 4 years ago

Maybe this is documentation typo

ishanuda commented 4 years ago

Hi, Have any idea about why the global setting is not working? Is it a bug in the library?

regards

splincode commented 4 years ago

Sorry, I am in vacation. Sorry, I am in vacation

splincode commented 3 years ago

Move to https://github.com/Angular-RU/angular-ru-sdk/issues/869