Skip to content

Instantly share code, notes, and snippets.

@YonathanMeguira
Last active August 21, 2018 08:24
Show Gist options
  • Save YonathanMeguira/c5c702652f33717b00ab9e145e7f13f5 to your computer and use it in GitHub Desktop.
Save YonathanMeguira/c5c702652f33717b00ab9e145e7f13f5 to your computer and use it in GitHub Desktop.
shopika-edit.component
import { List, Item, ShopikaService, ListQuery } from '../state';
import { ID } from '@datorama/akita';
export class EditComponent implements OnInit {
list: List;
constructor(
private shopikaService: ShopikaService,
private listQuery: ListQuery
) { }
ngOnInit() {
this.list = this.listQuery.getActive();
}
saveItem(purchased, item) {
this.shopikaService.updateList(this.list, item, purchased);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment