Last active
August 21, 2018 08:24
-
-
Save YonathanMeguira/c5c702652f33717b00ab9e145e7f13f5 to your computer and use it in GitHub Desktop.
shopika-edit.component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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