Skip to content

meepobrother/meepo-store

Repository files navigation

store for angular

yarn add meepo-store
import { StorageWebModule } from 'meepo-store';
// 仅含有localStorage 减小代码体积
import { StoreModule } from 'meepo-store';
  • StorageWebModule
// export { as StorageWebModule} from 'angular-web-storage';
import { LocalStorageService, SessionStorageService, LocalStorage, SessionStorage } from 'meepo-store';
@LocalStorage() localValue: Object = { text: `Hello ${+new Date}`};
// 设置存储KEY,以及10个小时后过期
@LocalStorage('newKey', 10, 'h') localValue2: Object = { text: `Hello ${+new Date}`};
@SessionStorage() sessionValue: string = `Hello ${+new Date}`;
  • StoreModule
import { StoreService } from 'meepo-store';
StoreService.get(key)
StoreService.set(key,data)
StoreService.getList(key,page,psize)