angularjs - Phonegap-Cookies-Plugin issue -
i trying code cross-platform app using cordova , firebase while using phonegap-cookies-plugin clear cookies inappbrowser when using given example :
window.cookies.clear(function() { console.log('cookies cleared!'); }); my console saying : cannot read property 'clear' of undefined.
i wanted know if had ideas ?
details : reinstalled platforms , plugins sure it's installed. see in extract, using angularjs, ionic , ui router.
ref : https://github.com/bez4pieci/phonegap-cookies-plugin https://github.com/apache/cordova-plugin-inappbrowser
extract code :
angular.module('starter') .controller('profilectrl', function($rootscope,$scope,$state, usersrv, $ionicviewswitcher, $ionicmodal) { $scope.deconnectfb = function(){ $rootscope.loggedinuser='false'; window.cookies.clear(function() { console.log('cookies cleared!'); }); $rootscope.ref.unauth(); $state.go("welcome"); };
Comments
Post a Comment