我正在开发一个使用Angular js和Taffy DB的应用程序。
当我单击Submit按钮时,将执行以下方法。
javascript:
$scope.addList = function () {
console.log($scope.attendees);
var data=$scope.attendees;
teamlist.insert(data);
};当我第一次点击submit按钮时,console.log($scope.attendees);显示[Object{text="dffsd",$$hashKey="007"},Object{text="sdfsdf",$$hashKey="009"}]
当我第二次单击提交按钮时,console.log($scope.attendees);显示
[Object{ text="dffsd", $$hashKey="007", ___id="T000002R000002", more...}, Object { text="sdfsdf", $$hashKey="009", ___id="T000002R000003", more...}]可能的原因是什么?
我应该如何检查数据的存储位置?
我们如何像签入mySQL、mongoDB等一样查看数据?
数据是否存储在浏览器的本地存储中?
敬请指教
发布于 2014-01-23 01:39:54
尝试:
$scope.addList = function () {
console.log($scope.attendees);
var data=$scope.attendees;
teamlist = TAFFY(data);
//teamlist.insert(data);
};要检查数据,请尝试;
console.log( teamlist().get() );在您的代码中,数据存储在类似于数组的对象中
https://stackoverflow.com/questions/20903297
复制相似问题