Created
March 14, 2018 05:03
-
-
Save bharat-tiwari/7f1688c8190df95afa06152558ee938b to your computer and use it in GitHub Desktop.
This file contains 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 {Component,Input,SimpleChanges} from '@angular/core'; | |
@Component({ | |
selector: 'item-details', | |
templateUrl: 'item-details.html', | |
}) | |
export class ItemDetails { | |
private _item; // private property _item | |
// use getter setter to define the property | |
get item(): any { | |
return this._item; | |
} | |
@Input() | |
set item(val: any) { | |
console.log('previous item = ', this._item); | |
console.log('currently selected item=', val); | |
this._item = val; | |
this._item.status = 'In Process'; | |
} | |
@Input() notifyItemProcessed: () => void; | |
suppliedQuantity: number; | |
scannedUPC: string; | |
errors: string[]; | |
constructor(){} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment