Angular 2 TypeScript how to find element in Array

Source: https://stackoverflow.com/questions/37969984/angular-2-typescript-how-to-find-element-in-array
You need to use method Array.filter:
this.persons =  this.personService.getPersons().filter(x => x.id == this.personId)[0];
this.persons =  this.personService.getPersons().find(x => x.id == this.personId);

Không có nhận xét nào:

Check to be sure that port 22 is enabled before you reload

 https://superuser.com/questions/590600/ufw-is-active-but-not-enabled-why etting  ENABLED=yes  in  /etc/ufw/ufw.conf  did it for me. $ sudo ...