Skip to content

Commit 85b25ca

Browse files
devckenmarcj
authored andcommitted
This commit leads to Angular2.0.0 completely. (#63)
* This commit leads to Angular2.0.0 completely. - Introduce peerDependencies in package.json. - Arrange several dependencies. - LocalStorageEmitter#LocalStorageSubscriber signature modified. from LocalStorageSubscriber(appPromise: Promise<ComponentRef<any>>) to LocalStorageSubscriber(promise: Promise<NgModuleRef<any>>) - In WebStrage, chages type of variables implicitly declared with any. This provides type-safe codes. * Introduce WebStorageModule instead of LocalStroageSubsriber. - Using WebStorageUtility, it reduces code complexity. - No more NgZone. It doesn't poll the storage, and set and then just get. * WebStroageService changed to WebStorageService * fixed issue with initializing setter
1 parent d1eb792 commit 85b25ca

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+585
-393
lines changed

.gitignore

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,212 @@
1+
### Eclipse template
2+
3+
.metadata
4+
bin/
5+
tmp/
6+
*.tmp
7+
*.bak
8+
*.swp
9+
*~.nib
10+
local.properties
11+
.settings/
12+
.loadpath
13+
.recommenders
14+
15+
# Eclipse Core
16+
.project
17+
18+
# External tool builders
19+
.externalToolBuilders/
20+
21+
# Locally stored "Eclipse launch configurations"
22+
*.launch
23+
24+
# PyDev specific (Python IDE for Eclipse)
25+
*.pydevproject
26+
27+
# CDT-specific (C/C++ Development Tooling)
28+
.cproject
29+
30+
# JDT-specific (Eclipse Java Development Tools)
31+
.classpath
32+
33+
# Java annotation processor (APT)
34+
.factorypath
35+
36+
# PDT-specific (PHP Development Tools)
37+
.buildpath
38+
39+
# sbteclipse plugin
40+
.target
41+
42+
# Tern plugin
43+
.tern-project
44+
45+
# TeXlipse plugin
46+
.texlipse
47+
48+
# STS (Spring Tool Suite)
49+
.springBeans
50+
51+
# Code Recommenders
52+
.recommenders/
53+
### Windows template
54+
# Windows image file caches
55+
Thumbs.db
56+
ehthumbs.db
57+
58+
# Folder config file
59+
Desktop.ini
60+
61+
# Recycle Bin used on file shares
62+
$RECYCLE.BIN/
63+
64+
# Windows Installer files
65+
*.cab
66+
*.msi
67+
*.msm
68+
*.msp
69+
70+
# Windows shortcuts
71+
*.lnk
72+
### JetBrains template
73+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
74+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
75+
76+
# User-specific stuff:
77+
.idea
78+
.idea/workspace.xml
79+
.idea/tasks.xml
80+
.idea/dictionaries
81+
.idea/vcs.xml
82+
.idea/jsLibraryMappings.xml
83+
84+
# Sensitive or high-churn files:
85+
.idea/dataSources.ids
86+
.idea/dataSources.xml
87+
.idea/dataSources.local.xml
88+
.idea/sqlDataSources.xml
89+
.idea/dynamic.xml
90+
.idea/uiDesigner.xml
91+
92+
# Gradle:
93+
.idea/gradle.xml
94+
.idea/libraries
95+
96+
# Mongo Explorer plugin:
97+
.idea/mongoSettings.xml
98+
99+
## File-based project format:
100+
*.iws
101+
102+
## Plugin-specific files:
103+
104+
# IntelliJ
105+
/out/
106+
107+
# mpeltonen/sbt-idea plugin
108+
.idea_modules/
109+
110+
# JIRA plugin
111+
atlassian-ide-plugin.xml
112+
113+
# Crashlytics plugin (for Android Studio and IntelliJ)
114+
com_crashlytics_export_strings.xml
115+
crashlytics.properties
116+
crashlytics-build.properties
117+
fabric.properties
118+
### SublimeText template
119+
# cache files for sublime text
120+
*.tmlanguage.cache
121+
*.tmPreferences.cache
122+
*.stTheme.cache
123+
124+
# workspace files are user-specific
125+
*.sublime-workspace
126+
127+
# project files should be checked into the repository, unless a significant
128+
# proportion of contributors will probably not be using SublimeText
129+
# *.sublime-project
130+
131+
# sftp configuration file
132+
sftp-config.json
133+
134+
# Package control specific files
135+
Package Control.last-run
136+
Package Control.ca-list
137+
Package Control.ca-bundle
138+
Package Control.system-ca-bundle
139+
Package Control.cache/
140+
Package Control.ca-certs/
141+
bh_unicode_properties.cache
142+
143+
# Sublime-github package stores a github token in this file
144+
# https://packagecontrol.io/packages/sublime-github
145+
GitHub.sublime-settings
146+
### OSX template
147+
*.DS_Store
148+
.AppleDouble
149+
.LSOverride
150+
151+
# Icon must end with two \r
152+
Icon
153+
154+
# Thumbnails
155+
._*
156+
157+
# Files that might appear in the root of a volume
158+
.DocumentRevisions-V100
159+
.fseventsd
160+
.Spotlight-V100
161+
.TemporaryItems
162+
.Trashes
163+
.VolumeIcon.icns
164+
.com.apple.timemachine.donotpresent
165+
166+
# Directories potentially created on remote AFP share
167+
.AppleDB
168+
.AppleDesktop
169+
Network Trash Folder
170+
Temporary Items
171+
.apdisk
172+
### Node template
173+
# Logs
174+
logs
175+
*.log
176+
npm-debug.log*
177+
178+
# Runtime data
179+
pids
180+
*.pid
181+
*.seed
182+
183+
# Directory for instrumented libs generated by jscoverage/JSCover
184+
lib-cov
185+
186+
# Coverage directory used by tools like istanbul
187+
coverage
188+
189+
# nyc test coverage
190+
.nyc_output
191+
192+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
193+
.grunt
194+
195+
# node-waf configuration
196+
.lock-wscript
197+
198+
# Compiled binary addons (http://nodejs.org/api/addons.html)
199+
build/Release
200+
201+
# Dependency directories
1202
node_modules
203+
jspm_packages
204+
205+
# Optional npm cache directory
206+
.npm
207+
208+
# Optional REPL history
209+
.node_repl_history
210+
211+
### Typings
2212
typings

LocalStorageEmitter.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,17 @@ This project is not maintained. Please consider taking it over. More information
1010
## Use
1111

1212
1. Download the library using npm or github: `npm install --save angular2-localstorage`
13-
2. Register the LocalStorage in your `boot.ts`:
14-
```typescript
15-
import {LocalStorageService, LocalStorageSubscriber} from 'angular2-localstorage/LocalStorageEmitter';
16-
var appPromise = bootstrap(MyRootAppComponent, [ LocalStorageService ]);
17-
18-
// register LocalStorage, this registers our change-detection.
19-
LocalStorageSubscriber(appPromise);
20-
```
21-
or in your root component:
13+
2. Import the WebStorageModule in your app module:
2214
```typescript
2315
import {Component} from "angular2/core";
24-
import {LocalStorageService} from "angular2-localstorage/LocalStorageEmitter";
16+
import {WebStorageModule, LocalStorageService} from "angular2-localstorage";
2517

18+
@NgModule({
19+
import: [WebStorageModule]
2620
@Component({
2721
providers: [LocalStorageService]
2822
})
29-
export class AppRoot{
30-
constructor(storageService: LocalStorageService){}
31-
...
32-
}
23+
export class AppModule {}
3324
```
3425
3526

0 commit comments

Comments
 (0)