Angular 2 Observing a Service and find Results

As i do not write so much blog posts, i decided to write some just short snippets for known problems. This covers searching inside Object Array for Angular 2 and Typescript Finding index of an Array Entry with Angular 2 and Typescript Example of how to use Observer able service in Angular 2
//service is Observable = 'nameToFind';
GetGalleryPics(galleryId).subscribe((data:Picture[]) => {
        //success = data;
        //searching inside the array and find first entry 
        this.picture = => ==[0]
        let pictureIndex = => ==;
        console.log('this picture'+pictureIndex);



Beliebte Posts aus diesem Blog

An Enterprise has just adopted the SAFe Implementation Roadmap and is in the process of training executives, managers, and leaders. What is their next step?

During the final plan review, Program risks are addressed using ROAM. What do the letters in ROAM represent?

Which core competency ot the Lean Enterprise helps drive Bullt-in Quality practices?