Please try the following:
.controller('ExampleCtrl', function ($scope) { var ss = new cordova.plugins.SecureStorage( function () { console.log('Success'); }, function (error) { console.log('Error ' + error); }, 'my_app'); });
So, remove SecureStorage from the controller arguments and add cordova.plugins. in the second line.
And don't forget to install the plugin (of course):
ionic plugin add cordova-plugin-secure-storage --save
Now you can use the functions on ss , but do not use the documentation in the link you specified, as this is the Ionic 2 documentation. Instead, use the plugin documentation: https://github.com/Crypho/cordova-plugin-secure-storage
source share