ng7-storage
Advanced tools
Comparing version 1.1.5 to 1.1.6
{ | ||
"name": "ng7-storage", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "Share Data among multiple components in angular using browser session storage", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# ng-storage | ||
![Build](https://github.com/edisonaugusthy/ng-storage/workflows/Node.js%20CI/badge.svg)![Publish](https://github.com/edisonaugusthy/ng-storage/workflows/NPM%20Publish/badge.svg) | ||
@@ -9,6 +8,6 @@ Share Data among multiple components in angular using browser session storage | ||
Angular compatibility | ||
| Angular Version | package version | ||
| ------------- |:-------------:| | ||
| angular 8 and below | 1.1.4 and below | | ||
| angular 9 and above(ivy version)| 1.1.5 and above| | ||
| Angular Version | package version | | ||
| -------------------------------- | :-------------: | | ||
| angular 8 and below | 1.1.4 and below | | ||
| angular 9 and above(ivy version) | 1.1.5 and above | | ||
@@ -20,3 +19,4 @@ ## Usage steps | ||
```imports: [ | ||
```ts | ||
imports: [ | ||
BrowserModule, | ||
@@ -28,4 +28,4 @@ StorageModule | ||
- Then import NgStorageService service `import { NgStorageService } from 'ng7-storage';` in the components that you would like to use | ||
- Then Initialize StorageService in the component constructor | ||
``` | ||
- Then Initialize `StorageService` in the component constructor | ||
```ts | ||
constructor(private StorageService: NgStorageService) { | ||
@@ -39,9 +39,11 @@ | ||
`this.StorageService.setData({ key: 'key_of_data', value: res ,encrypt:optional|boolean})` | ||
```ts | ||
this.StorageService.setData({ key: 'key_of_data', value: res ,encrypt:optional|boolean}) | ||
``` | ||
Pass key value pairs to store data , and key should be valid string | ||
>Pass key value pairs to store data , and key should be valid string | ||
NB: data format that accepted by `setData` method is | ||
```ts | ||
export interface dataFormat { | ||
@@ -53,2 +55,3 @@ key: string; | ||
} | ||
``` | ||
@@ -59,5 +62,8 @@ NB:`encrypt` is a development onprogress feature and may have issues when setting data that has special characters | ||
eg:`this.StorageService.getData({key: 'key_of_data',decrypt:optional|boolean})` | ||
eg: | ||
```js | ||
this.StorageService.getData({key: 'key_of_data',decrypt:optional|boolean}) | ||
``` | ||
Use `getData` method to retrieve data, pass `key` of the item | ||
>Use `getData` method to retrieve data, pass `key` of the item | ||
@@ -79,6 +85,8 @@ | ||
#### All Available methods | ||
- `setData()` | ||
- `getData()` | ||
- `removeData()` | ||
- `removeAll()` | ||
```ts | ||
setData() | ||
getData() | ||
removeData() | ||
removeAll() | ||
``` | ||
@@ -88,4 +96,4 @@ ## Browsers support | ||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/vivaldi/vivaldi_48x48.png" alt="Vivaldi" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Vivaldi | | ||
| --------- | --------- | --------- | --------- | | ||
| IE11, Edge| last 8 versions| last 8 versions| last 5 versions | ||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| IE11, Edge | last 8 versions | last 8 versions | last 5 versions | | ||
@@ -92,0 +100,0 @@ |
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
45664
21
0
113