angularjs - Uncaught TypeError: Cannot call method 'put' of undefined -
i facing issue when trying store data in angular controller page using $cookiestore
. there additional configurations have left out ?
function fblogin($cookiestore){ $cookiestore.put("userid",'12345'); validateuser(userid); alert(userid); }
you're not defining userid
anywhere javascript. you're setting cookie value userid=12345
, calling validateuser
unknown variable, userid
has undefined value.
Comments
Post a Comment