Skip to content

Commit

Permalink
Merge pull request #94 from gurix/patch-3
Browse files Browse the repository at this point in the history
Added some additional informations for binding initially.
  • Loading branch information
ocombe committed Jan 12, 2016
2 parents b773edf + b2767f0 commit 233afbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ $localForage.iterate(function(value, key) {
```js
$localForage.bind($scope, 'myStorageKey');
```

**Note: It only binds when the object is already stored in the database or when you provide a default value.**
```js
$localForage.bind($scope, {
key: 'myStorageKey', // required
defaultValue: {test: 'my test'}, // a default value
defaultValue: {test: 'my test'}, // a default value (needed if it is not already in the database)
scopeKey: 'myObj.myVar', // the name of the scope key (if you want it to be different from key)
name: 'myApp' // instance name
});
Expand Down

0 comments on commit 233afbc

Please sign in to comment.