当我尝试将字符串转换为对象时,出现错误 ``:
Unexpected token u in JSON at position 0
服务
setUser : function(aUser){
//sauvegarder User
localStorage.setItem('User', JSON.stringify(aUser));
},
getUser : function(){
//récuperer User
return JSON.parse(localStorage.getItem('User'));
}