- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
this.addItem = function(item) {
if (item.id == null & item.Name != null & item.Name != '') {
item.id = uid++;
items.push(item);
$window.sessionStorage.setItem('items', JSON.stringify(items));
} else {
for (i in items) {
if (items[i].id == item.id) {
items[i] = item;
}
}
}
}