Im trying to leer Alloy Models but i have a situation that i can't solve.
this is the code that im using to store a model data, using localStorage (html5) but every time i refresh the browser window the data seems to be resetet. to the very last data that i input, here's the code
var library = Alloy.Collections.book; function add() { var book = Alloy.createModel('book', { name: $.txt.value, author : 'douglas' }); library.add(book); book.save(); } library.fetch(); $.win.open();