An Angular application contains the below information.

Student name

Rank

Alex

1

Maria

3

John

4

Peter

2

Sam

5

While displaying this on the screen, the user will be given a choice to sort by name or sort by rank. After sorting by name, the display should be as shown below:

Student Name

Rank

Alex

1st

John

4th

Maria

3rd

Peter

2nd

Sam

5th

If sorted by rank, the display should be as shown below:

Student name

Rank

Alex

1st

Peter

2nd

Maria

3rd

John

4th

Sam

5th

How can this be achieved?

Use a custom sort pipe which can return rank with its ordinal value, send the output of this to another custom pipe which can sort on name or age

Use a custom sort pipe which can sort on name, send the output to another custom pipe which can sort on age, then send the output of this to yet another custom pipe which can return rank with its ordinal value

Use a custom sort pipe which can sort on name or age, send the output of this to another custom pipe which can return rank with its ordinal value

Use a custom sort pipe which can return rank with its ordinal value, then send output of this to a custom pipe that can sort on name, then send the output to yet another custom pipe which can sort on age

Verified Answer
Correct Option - c

To get all Infosys Certified Technology Manager - Digital Development - Angular Exam questions Join Group https://bit.ly/infy_premium_group

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in