I'm working through a youtube tutorial and came across a code im not 
familiar with and need some clarification.

    isSelected(memberList){ 
    return memberList.id === this.selectedId;    
    }

is the code:    return memberList === this.selectedId  like a foreach loop 
that iterating through the memberList array to match a selectedId?

memberList is a list of test users.

isSelected function which is bind to a class

 <li  *ngFor="let user of memberList"  [class.selected]=
"isSelected(memberList)">
        <span class="badge" >{{user.id}}</span>
        {{user.name}}
      </li>

the author of the tutorial demonstrating how to code the back button and 
how the list should be highlighted. 

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/angular/8cf814e7-3020-42f8-a218-8ca432c93020%40googlegroups.com.

Reply via email to