Interviewer And Interviewee Guide

Front End Developer (AngularJS) Interview Question:

Explain me how will you display different images based on the status being red, amber, or green?

Submitted by: Muhammad
Use the ng-switch and ng-switch-when directives as shown below.

<div ng-switch on="account.status">
<div ng-switch-when="AMBER">
<img class="statusIcon"
src='apps/dashboard/amber-dot.jpg' />
</div>
<div ng-switch-when="GREEN">
<img class="statusIcon"
src='apps/dashboard/green-dot.jpg' />
</div>
<div ng-switch-when="RED">
<img class="statusIcon"
src='apps/dashboard/red-dot.jpg' />
</div>
</div>
Submitted by: Muhammad

Read Online Front End Developer (AngularJS) Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.