jmdobry / angular-cache

angular-cache is a very useful replacement for the Angular 1 $cacheFactory.
http://jmdobry.github.io/angular-cache
MIT License
1.39k stars 156 forks source link

What did the module name change to with 3.3.0.beta.3? i can't inject anymore #110

Closed jeffthompson1971 closed 10 years ago

jeffthompson1971 commented 10 years ago

This is easy.. just need to know a) how to import the module to my app and then how to inject into my service... was working with older version, now it seems module name is no longer 'jmdobry.angular-cache'. What was the module renamed to?

When i add that to my apps list of modules it cannot find it..

Then I changed it to this and it finds it, but now it's complaining on the name i choose to pull it into my service. Why would the names change from version to version?

I had to make it like this:

var assetsApp = angular.module('assetsApp', [ //'jmdobry.angular-cache', STOPPED WORKING (why did this change?) 'angular-data.DSCacheFactory', // this gets past the import error 'ngCookies', 'ngResource', 'ngSanitize', 'ngRoute', 'ngTouch', 'ui.bootstrap', 'directive.g+signin', 'dynform', 'LocalStorageModule',

but still can't inject in my servers as $angullarCacheFactory:

Uncaught Error: [$injector:unpr] Unknown provider: $angularCacheFactoryProvider <- $angularCacheFactory <- CacheService http://errors.angularjs.org/1.2.13/$injector/unpr?p0=%24angularCacheFactoryProvider%20%3C-%20%24angularCacheFactory%20%3C-%20CacheService

jmdobry commented 10 years ago

@jeffthompson1971 For the new angular-cache 3.x.x (which is still in beta), I've moved angular-cache under the umbrella project of angular-data. I renamed the module accordingly. This is a breaking change, which is why the MAJOR version changed from 2 to 3. I assume that for the issue you created an hour ago you were using a 2.x.x version of angular-cache.

If you want to use the 3.x.x version (which is still in beta), you'll have to update your code according to the breaking changes. (I haven't put them into the transition document yet, but they are in the changelog.) Otherwise, go back to using 2.x.x and you won't experience this issue.

jeffthompson1971 commented 10 years ago

thanks Jason. So the reason i moved to this version was becuase it has that bug fix that was breaking cache with localstorage mode. I actuaally opened a bug report for that today too, but then saw that indeed that issue was already reported and was fixed in 3.3 beta3. So when i pulled that i noticed this issue about the name changing and all of that.

Any reason I should not just move to this new stuff? I really just want the feature of cache backed by localstorage... i dig that ;) what do you recommend I do?

On Tue, Apr 1, 2014 at 2:54 PM, Jason Dobry notifications@github.comwrote:

Closed #110 https://github.com/jmdobry/angular-cache/issues/110.

Reply to this email directly or view it on GitHubhttps://github.com/jmdobry/angular-cache/issues/110 .

jmdobry commented 10 years ago

@jeffthompson1971 You're welcome to use 3.x.x-beta.1

It's still in beta, so there may be breaking changes again before 3.0.0 (probably not). I need to close a few more issues before the beta is ready for 3.0.0

jeffthompson1971 commented 10 years ago

we all have bugs, but few are as quick to respond as you, so i'll stick with your lib for all my projects. if there is breakage we'll work through it ;)

On Tue, Apr 1, 2014 at 3:24 PM, Jason Dobry notifications@github.comwrote:

@jeffthompson1971 https://github.com/jeffthompson1971 You're welcome to use 3.x.x-beta.1

It's still in beta, so there may be breaking changes again before 3.0.0 (probably not). I need to close a few more issues before the beta is ready for 3.0.0

Reply to this email directly or view it on GitHubhttps://github.com/jmdobry/angular-cache/issues/110#issuecomment-39253957 .

jmdobry commented 10 years ago

@jeffthompson1971 You caught me during some free time ;)