Giter Site home page Giter Site logo

angular-webstorage's Issues

Error on has(key) check if not set

When checking for the existence of a key before setting a value, I get the an error, e.g.

console.log(webStorage.has('user'));

generates...

Uncaught TypeError: undefined is not a function 

Am I missing something?

Session storage should not fallback to cookies

Session storage is, by design intended for potentially private data.
For this reason, it cannot be shared between tabs, or persist. And it is for this reason I think you should consider removing the cookie fallback for sessions storage. (or make it configurable)


Great work elsewhere by the way, great plugin!

Add to Bower registry?

This would be useful to have on the Bower registry - perhaps you can add a Bower json manifest then bower register angular-webstorage https://github.com/fredricrylander/angular-webstorage.git?

Allow setting empty object

Hi,
you should allow setting empty object as

webStorage.add('ordersList', {}, true);

Just update your doc (the code already works)

New release version

It would be useful to create a new version (tag) for the last merge, to reference from package.json.

If I try to reference your library from my package.json it doesn't find the package.json because it's not in version 0.14.0.

change bower dependency to the latest angularjs

The bower.json is depending on the angular 1.0 or 1.1 which is much old, can you please change it to the newer version like 1.2.7? It's causing issue that bower always ask for conflict resolution when running bower install...

"dependencies": {
"angular": ">=1"
}

Naming of `add()`

If there a reason you opted for add() in the API? I personally think it should be set() and get().
add() almost implies its just for adding , and not updating as well.

How to specify the order in my app config?

I am trying to set the order of the storage.
Is there a way to do it as part of the angular app.config?

Example

var App = angular.module('App', ['webStorageModule']);
App.config(function ($routeProvider, webStorage, $httpProvider) {
  webStorage.order('local', 'session', 'memory');
});

Trailing commas of death

The module got 3 trailing commas of death that makes IE choke, on lines 161, 175, 189 and 190.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.