Inserting data into Taffy DB

887 views Asked by At

I am developing an application using Angular js and Taffy DB.

When I click Submit button,the following method gets executed.

javascript:

$scope.addList = function () {
console.log($scope.attendees);
var data=$scope.attendees;
teamlist.insert(data);
};

When I click submit button for first time,console.log($scope.attendees); shows [Object{text="dffsd",$$hashKey="007"},Object{text="sdfsdf",$$hashKey="009"}]

When I click submit button for second time,console.log($scope.attendees); shows

[Object{ text="dffsd", $$hashKey="007", ___id="T000002R000002", more...}, Object { text="sdfsdf", $$hashKey="009", ___id="T000002R000003", more...}]

What may be the reason?

How Shall I check where the data is getting stored?

How can we view the data just like we are checking in mySQL,mongoDB etc.?

Do the data get stored in local storage of the browser?

Please Advice

1

There are 1 answers

0
diegoguevara On

try:

$scope.addList = function () {
   console.log($scope.attendees);
   var data=$scope.attendees;
   teamlist = TAFFY(data);
   //teamlist.insert(data);
};

to check data try;

console.log( teamlist().get() );

Data is stored in an object like an Array in your code