https://github.com/meepobrother/meepo-store
缓存相关
https://github.com/meepobrother/meepo-store
angular directive server store
Last synced: 2 months ago
JSON representation
缓存相关
- Host: GitHub
- URL: https://github.com/meepobrother/meepo-store
- Owner: meepobrother
- License: mit
- Created: 2017-12-28T12:59:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T01:13:09.000Z (over 8 years ago)
- Last Synced: 2025-10-07T17:56:28.381Z (9 months ago)
- Topics: angular, directive, server, store
- Language: JavaScript
- Homepage: https://meepo.com.cn
- Size: 1.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# store for angular
```
yarn add meepo-store
```
```ts
import { StorageWebModule } from 'meepo-store';
// 仅含有localStorage 减小代码体积
import { StoreModule } from 'meepo-store';
```
- StorageWebModule
```ts
// 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
```ts
import { StoreService } from 'meepo-store';
StoreService.get(key)
StoreService.set(key,data)
StoreService.getList(key,page,psize)
```