driftyco/ng-cordova — pull request #367 by bkonowitz (2014-10-12 04:07:56+00:00)
Title: Moved the cordovaKeychain service to match the shazron/KeychainPlugin examples.

Not sure if other people ran into this, but adding $cordovaKeychain to a bare-bones Ionic app failed, causing an exception during bootstrapping "Keychain is not defined" due to the DI flow trying to initialize the service var kc. By moving the creation into the functions (as shown in the shazron/KeychainPlugin examples) its lazy initialized and addresses the problem. I have an alternate version I'm working on that swaps in the single kc on the $ionicPlatform.ready callback, but thought this was more straightforward behavior.