ng2-webstorage
Advanced tools
Comparing version 1.1.0 to 1.2.0
@@ -1,2 +0,1 @@ | ||
import { SessionStorageService } from './services/index'; | ||
export * from './decorators/index'; | ||
@@ -6,2 +5,3 @@ export * from './interfaces/index'; | ||
export * from './helpers/keyStorage'; | ||
export declare const NG2_WEBSTORAGE: typeof SessionStorageService[]; | ||
export declare class Ng2Webstorage { | ||
} |
"use strict"; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
var core_1 = require('@angular/core'); | ||
var platform_browser_1 = require('@angular/platform-browser'); | ||
var index_1 = require('./services/index'); | ||
@@ -9,6 +20,16 @@ __export(require('./decorators/index')); | ||
__export(require('./helpers/keyStorage')); | ||
exports.NG2_WEBSTORAGE = [ | ||
index_1.SessionStorageService, | ||
index_1.LocalStorageService | ||
]; | ||
var Ng2Webstorage = (function () { | ||
function Ng2Webstorage() { | ||
} | ||
Ng2Webstorage = __decorate([ | ||
core_1.NgModule({ | ||
declarations: [], | ||
providers: [index_1.SessionStorageService, index_1.LocalStorageService], | ||
imports: [platform_browser_1.BrowserModule] | ||
}), | ||
__metadata('design:paramtypes', []) | ||
], Ng2Webstorage); | ||
return Ng2Webstorage; | ||
}()); | ||
exports.Ng2Webstorage = Ng2Webstorage; | ||
//# sourceMappingURL=app.js.map |
133
package.json
{ | ||
"name": "ng2-webstorage", | ||
"version": "1.1.0", | ||
"description": "angular2 webstorage manager", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"devDependencies": { | ||
"@angular/common": "^2.0.0-rc.4", | ||
"@angular/compiler": "^2.0.0-rc.4", | ||
"@angular/core": "^2.0.0-rc.4", | ||
"@angular/platform-browser": "2.0.0-rc.4", | ||
"@angular/platform-browser-dynamic": "^2.0.0-rc.4", | ||
"compression-webpack-plugin": "^0.3.1", | ||
"es6-shim": "^0.35.1", | ||
"es6-symbol": "^3.0.2", | ||
"es7-reflect-metadata": "^1.6.0", | ||
"istanbul-instrumenter-loader": "^0.2.0", | ||
"jasmine-core": "2.4.1", | ||
"karma": "^0.13.22", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-coverage": "^1.0.0", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-mocha-reporter": "^2.0.3", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^1.7.0", | ||
"remap-istanbul": "^0.6.4", | ||
"rimraf": "^2.5.2", | ||
"rxjs": "^5.0.0-beta.8", | ||
"source-map-loader": "^0.1.5", | ||
"ts-helpers": "^1.1.1", | ||
"ts-loader": "^0.8.2", | ||
"tslint": "^3.10.2", | ||
"tslint-loader": "^2.1.4", | ||
"typescript": "^1.8.10", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1", | ||
"webpack-merge": "^0.13.0", | ||
"zone.js": "^0.6.12" | ||
}, | ||
"scripts": { | ||
"tsc": "node node_modules/typescript/bin/tsc -d --outDir dist --sourceMap", | ||
"clean": "node node_modules/rimraf/bin dist", | ||
"prebuild": "npm run clean", | ||
"build": "npm run tsc", | ||
"dev": "webpack-dev-server --content-base example --hot --progress -c --config config/webpack.dev.js", | ||
"test": "karma start", | ||
"test:watch": "npm run test -- --auto-watch --no-single-run" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/PillowPillow/ng2-webstorage.git" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"angular2", | ||
"ng2", | ||
"localstorage", | ||
"sessionStorage" | ||
], | ||
"author": "Nicolas Gaignoux <https://github.com/PillowPillow>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/PillowPillow/ng2-webstorage/issues" | ||
}, | ||
"homepage": "https://github.com/PillowPillow/ng2-webstorage#readme" | ||
"name": "ng2-webstorage", | ||
"version": "1.2.0", | ||
"description": "angular2 webstorage manager", | ||
"main": "index.js", | ||
"typings": "index.d.ts", | ||
"devDependencies": { | ||
"@angular/common": "^2.0.1", | ||
"@angular/compiler": "^2.0.1", | ||
"@angular/core": "^2.0.1", | ||
"@angular/forms": "^2.0.1", | ||
"@angular/platform-browser": "2.0.1", | ||
"@angular/platform-browser-dynamic": "^2.0.1", | ||
"compression-webpack-plugin": "^0.3.1", | ||
"es6-shim": "^0.35.1", | ||
"es6-symbol": "^3.0.2", | ||
"es7-reflect-metadata": "^1.6.0", | ||
"istanbul-instrumenter-loader": "^0.2.0", | ||
"jasmine-core": "2.4.1", | ||
"karma": "^0.13.22", | ||
"karma-chrome-launcher": "^1.0.1", | ||
"karma-coverage": "^1.0.0", | ||
"karma-jasmine": "^1.0.2", | ||
"karma-mocha-reporter": "^2.0.3", | ||
"karma-sourcemap-loader": "^0.3.7", | ||
"karma-webpack": "^1.7.0", | ||
"remap-istanbul": "^0.6.4", | ||
"rimraf": "^2.5.2", | ||
"rxjs": "^5.0.0-beta.12", | ||
"source-map-loader": "^0.1.5", | ||
"ts-helpers": "^1.1.1", | ||
"ts-loader": "^0.8.2", | ||
"tslint": "^3.10.2", | ||
"tslint-loader": "^2.1.4", | ||
"typescript": "^1.8.10", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1", | ||
"webpack-merge": "^0.13.0", | ||
"zone.js": "^0.6.12" | ||
}, | ||
"scripts": { | ||
"tsc": "node node_modules/typescript/bin/tsc -d --outDir dist --sourceMap", | ||
"clean": "node node_modules/rimraf/bin dist", | ||
"prebuild": "npm run clean", | ||
"build": "npm run tsc", | ||
"dev": "webpack-dev-server --content-base example --port=8080 --hot --progress -c --config config/webpack.dev.js", | ||
"dev2": "webpack-dev-server --content-base example --port=8081 --host 0.0.0.0 --hot --progress -c --config config/webpack.dev.js", | ||
"test": "karma start", | ||
"test:watch": "npm run test -- --auto-watch --no-single-run" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/PillowPillow/ng2-webstorage.git" | ||
}, | ||
"keywords": [ | ||
"typescript", | ||
"angular2", | ||
"ng2", | ||
"localstorage", | ||
"sessionStorage" | ||
], | ||
"author": "Nicolas Gaignoux <https://github.com/PillowPillow>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/PillowPillow/ng2-webstorage/issues" | ||
}, | ||
"homepage": "https://github.com/PillowPillow/ng2-webstorage#readme", | ||
"dependencies": { | ||
"zone.js": "^0.6.23" | ||
} | ||
} |
@@ -27,21 +27,20 @@ # ng2-webstorage | ||
1. Download the library using npm `npm install --save ng2-webstorage` | ||
2. Register the library in your ng2 application (bootstrap or any component your want) | ||
2. Register the library in your module | ||
```typescript | ||
import {NG2_WEBSTORAGE} from 'ng2-webstorage'; | ||
import {bootstrap} from '@angular/platform-browser-dynamic'; | ||
import {NgModule} from '@angular/core'; | ||
import {BrowserModule} from '@angular/platform-browser'; | ||
import {Ng2Webstorage} from 'ng2-webstorage'; | ||
bootstrap(App, [ NG2_WEBSTORAGE ]); | ||
``` | ||
@NgModule({ | ||
declarations: [...], | ||
imports: [ | ||
BrowserModule, | ||
Ng2Webstorage | ||
], | ||
bootstrap: [...] | ||
}) | ||
export class AppModule { | ||
} | ||
```typescript | ||
import {Component} from '@angular/core'; | ||
import {NG2_WEBSTORAGE} from 'ng2-webstorage'; | ||
@Component({ | ||
selector: 'foo', | ||
template: `foobar`, | ||
providers: [NG2_WEBSTORAGE] | ||
}) | ||
export class FooComponent {} | ||
``` | ||
@@ -57,4 +56,3 @@ | ||
selector: 'foo', | ||
template: `foobar`, | ||
providers: [NG2_WEBSTORAGE]//can be [LocalStorageService] | ||
template: `foobar` | ||
}) | ||
@@ -61,0 +59,0 @@ export class FooComponent { |
Sorry, the diff of this file is not supported yet
35746
376
1
32
314
+ Addedzone.js@^0.6.23
+ Addedzone.js@0.6.26(transitive)